fix sin romper

    by Natalia Perez

    1

    Disciplined JS/TS bug investigation and repair that preserves local work and demands evidence before editing code.

    Free

    Security scanned

    Works with the AI Agents you already use

    fix sin romper

    Example session with this skill installed

    There is a TypeError in src/utils/format.ts causing the build to fail. Fix it, but don't touch my other changes in that file.

    • Read your context and instructions
    • Compiled the fix sin romper

    I have investigated the failure and applied a minimal patch to src/utils/format.ts. Your existing uncommitted changes in the formatCurrency function were preserved.

    Cause: The error TypeError: Cannot read properties of undefined (reading 'map') was triggered in the formatTags function because it lacked a null check for the input array.
    Change: Updated src/utils/format.ts to include a null-coalescing operator on the tags parameter.
    Verification: Ran npm test src/utils/format.test.ts. The specific test case handles undefined tags now passes.
    Still unverified: I have not verified if this change impacts the localized string output in the production build.

    Correction Summary

    FileActionPurpose
    src/utils/format.tsModifiedAdded optional chaining to tags to prevent runtime TypeErrors.
    // src/utils/format.ts
    
    export const formatTags = (tags?: string[]) => {
      // Minimal fix: ensure tags is defined before calling .map()
      return tags?.map(tag => tag.toLowerCase()) ?? [];
    };
    

    Next steps

    1. Run the full suite with npm test to ensure no side effects in related components.
    2. Review the git diff to confirm your previous edits to formatCurrency remain intact.
    3. Trigger a manual build to verify the fix in your local environment.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Stop dealing with agents that overwrite your local changes or guess at bug fixes. This skill provides a disciplined workflow for investigating and repairing JavaScript and TypeScript web applications without breaking your existing work. It forces a diagnostic-first approach, ensuring every code change is backed by observable evidence from logs, stack traces, or failing tests.

    What it does

    • Evidence-based diagnosis connects runtime errors and regressions to specific code paths before proposing solutions.
    • Work preservation inspects git status and diffs to ensure no pre-existing local changes are overwritten or discarded.
    • Minimal patching applies the smallest possible correction to solve the bug, avoiding broad rewrites or style changes.
    • Honest verification reports exactly which tests passed and which behaviors remain unverified, avoiding false success claims.
    • Safe execution blocks high-impact actions like database migrations, deployments, or network-accessing commands.

    How it works

    1. Context discovery reads your package.json, README.md, or AGENTS.md to identify valid test commands and project roots.
    2. Conflict check scans for uncommitted changes in the target files to prevent data loss.
    3. Failure reproduction runs the narrowest possible test or diagnostic to confirm the reported error.
    4. Targeted correction applies a focused fix only after the user explicitly approves the repair.
    5. Final audit reviews the diff and runs regression checks to confirm the fix works as intended.

    Frameworks & tools

    This skill is designed for JavaScript and TypeScript ecosystems. It works with standard project manifests like package.json and respects local configurations found in AGENTS.md or CLAUDE.md.

    Why this beats prompting it yourself

    Generic prompts often lead to "hallucinated" fixes or broad refactors that introduce new bugs. This skill implements a strict stop-condition logic that prevents the agent from making speculative edits when evidence is missing.

    Use cases

    • Debugging a specific failing Vitest or Jest unit test in a monorepo.
    • Diagnosing a TypeError in a React component without touching unrelated files.
    • Investigating a regression in a TypeScript utility library.
    • Safely repairing a bug in a file where you already have uncommitted work.

    Known limitations

    Does not support non-JS/TS languages. It will not install missing dependencies or perform database migrations. Minimal support for bugs requiring network access for reproduction.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 12 days ago

    • Free with an Agensi account

    Software
    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed12 days ago

    What's inside

    Frequently Asked Questions

    This skill enforces a 'diagnostic-first' workflow that prevents the AI from making speculative edits. It requires the agent to reproduce the bug with evidence before proposing a fix, ensuring your codebase isn't cluttered with unnecessary refactors.

    The skill performs a conflict check by scanning git status and local diffs before any edits occur. It is specifically programmed to respect uncommitted code, ensuring your current progress isn't overwritten or discarded during the repair process.

    It is optimized for JavaScript and TypeScript ecosystems, supporting tools like Vitest, Jest, and standard npm/yarn/pnpm workflows. It integrates seamlessly with agents that support local filesystem access and custom instructions like those found in CLAUDE.md or AGENTS.md.

    The skill requires a standard JavaScript/TypeScript project structure with a package.json. While it handles discovery automatically, you can optimize performance by defining your test commands in a README.md or AGENTS.md file.

    No, the skill is designed for safe, local code repairs. It explicitly blocks high-impact actions like database migrations, external network requests, or production deployments to maintain a secure development environment.

    Your purchase includes the full skill definition and workflow logic compatible with major AI agent marketplaces. You will also receive documentation on how to trigger the 'evidence-based' loop for the most efficient debugging results.

    New in Testing & Debugging

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.

    Free