Reuse before build

    1

    Prevent codebase bloat by identifying reusable helpers and current repository patterns before building new ones.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Reuse before build

    Example session with this skill installed

    I need to add email validation to the new user registration route. Check if we have an existing helper for this or if I should write a regex.

    • Read your context and instructions
    • Compiled the reuse before build

    I have inspected the repository for email validation patterns. I found an existing shared validator that fits the server-side requirements.

    Recommendation: Reuse lib/validation/schemas.ts

    Evidence TypeFile PathLineNotes
    Helper Definitionsrc/lib/validation/schemas.ts42-48Uses zod for server-side string validation with custom TLD checks.
    Current Callersrc/app/api/auth/reset/route.ts12Standard implementation for identity-based routes.
    Legacy Patternsrc/legacy/utils/email.js5Avoid. This uses a basic regex and is marked for deprecation in CONTRIBUTING.md.

    The emailSchema in src/lib/validation/schemas.ts is the current repository standard. It handles the specific error messages required by our frontend toast components, which a local regex would miss. It is runtime-compatible with the Node.js server environment and does not import any browser-only dependencies.

    Next steps

    1. Import emailSchema from @/lib/validation/schemas into your registration route.
    2. Use the .safeParse() method to maintain consistent error response shapes.
    3. Delete the local regex draft to prevent logic duplication.

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

    About this skill

    Stop reinventing the wheel in every pull request. This skill prevents codebase bloat by identifying existing helpers, patterns, and conventions before you write a single line of new code.

    What it does

    • Helper Discovery scans your repository for existing utility functions and shared components that match your required logic.
    • Contract Analysis inspects definitions and callers to verify error behavior, dependencies, and runtime compatibility.
    • Pattern Validation distinguishes between current architectural guidance and legacy patterns to avoid propagating technical debt.
    • Suitability Comparison evaluates if adapting an existing helper is safer than a local implementation based on side effects and coupling.
    • Minimal Implementation recommends the smallest possible approach when no existing tool fits the specific requirements.

    How it works

    1. Behavior Definition identifies the specific layer, runtime, inputs, and outputs of the requested feature.
    2. Contextual Search locates focused helpers and reads their implementation plus 1-2 active call sites.
    3. Guidance Check verifies if candidates are deprecated or represent the current preferred repository standard.
    4. Recommendation provides a grounded path forward using specific file and line references as evidence.

    Frameworks & tools

    This skill is language-agnostic and works with any codebase where helpers, shared libraries, or architectural patterns are documented or discoverable through static inspection.

    Why this beats prompting it yourself

    Standard prompts often hallucinate utility functions or suggest the most frequent (but deprecated) pattern found in the context window. This skill enforces a systematic check of contracts and runtime constraints, ensuring you don't try to use browser-only code in a server route just because the names match.

    Use cases

    • Reviewing a new feature request to see if existing validators can be reused.
    • Diagnosing whether a bug should be fixed in a shared helper or a local caller.
    • Refactoring legacy code by identifying the current repository-wide patterns.
    • Onboarding to a new codebase by discovering established internal libraries.

    Known limitations

    Does not execute code to verify compatibility. Analysis is limited to the files and search scope accessible to the agent.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.

    Limited to static inspection only. Cannot verify runtime execution or test coverage. Scope is bounded by the files and repository instructions provided in the session context.

    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 16 days ago

    • Free with an Agensi account

    Permissions

    Read Files
    Listed16 days ago

    What's inside

    Frequently Asked Questions

    This skill stops developers from creating redundant utility functions by scanning your entire repository for existing logic, patterns, and architectural standards that already meet your needs.

    The skill is language-agnostic and works with any codebase, provided your AI agent has read access to the file system or repository context to perform static analysis.

    Unlike simple prompts, this skill performs 'Contract Analysis,' checking call sites and side effects to ensure a suggested helper won't break your specific runtime or environment.

    No manual setup is required; once enabled, the skill uses your existing repository structure and naming conventions to identify patterns and discover reusable components.

    The skill identifies deprecated vs. current patterns by analyzing recent call sites and architectural guidance, preventing you from accidentally copying outdated 'legacy' code.

    New in Code Quality & Review

    Free