consensus code repair

    1

    A multi-agent auditing and remediation pipeline that uses adversarial debate to find and fix codebase vulnerabilities.

    $10

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    consensus code repair

    Example session with this skill installed

    Audit the current directory for security vulnerabilities and dead code, then generate a remediation report with fix proposals for any high-severity issues found.

    • Read your context and instructions
    • Compiled the consensus code repair
    • Generated the document

    I have completed the multi-phase audit of the codebase. The scanner identified 12 issues: 8 instances of dead code (FAST_PATH) and 4 logic/security vulnerabilities (FULL_DEBATE). Proposer Alpha and Beta have generated competing remediation strategies for the high-priority defects.

    Audit Summary & Remediation Proposals

    Issue IDSeverityCategoryStatusWinnerScore
    SEC-001CriticalInsecure APIArbitratedHybrid94/100
    BUG-004HighRace ConditionDebatingTBD--
    CLN-002LowDead CodeAppliedAlpha100/100

    Top Proposal: SEC-001 (Broken Access Control)

    Alpha Proposal (Conservative):
    Wraps the existing endpoint in a permission check decorator. Minimal change to function signature.
    Beta Proposal (Structural):
    Refactors the Auth middleware to use a centralized RBAC provider and context managers for session cleanup.

    Arbiter Decision:
    Selected Hybrid. Combined Alpha's decorator for immediate closure with Beta's session management hardening.

    
    # Refined Implementation for /api/v1/resource
    @validated_permissions("admin")
    def update_resource(resource_id: str, payload: dict):
        with db_session_scope() as session:
            # Beta's structural fix for resource lifecycle
            resource = session.query(Resource).filter_by(id=resource_id).first()
            if not resource:
                raise ResourceNotFoundError(resource_id)
            resource.update(payload)
            return {"status": "success"}
    

    Next steps

    1. Review the interactive dashboard at AUDIT_REPORT.html for full diffs.
    2. Run python3 scripts/report_manager.py apply SEC-001 to commit the hybrid fix.
    3. Execute the test suite to confirm zero regressions in the auth flow.

    AUDIT_REPORT.html

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

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

    About this skill

    Manual patch cycles often leave behind systemic vulnerabilities, orphaned code, and structural regressions. Single-pass AI debugging frequently hallucinates or introduces breaking changes in coupled modules. This skill replaces ad-hoc fixing with a phase-gated, multi-agent pipeline that audits, triages, and resolves code defects using competitive debate and execution guardrails.

    What it does

    • Automated Auditing: Scans codebases using AST and call-graph analysis to find security leaks, logic bugs, and dead code.
    • Blast-Radius Triage: Categorizes issues into fast-path cleanups or full-debate queues based on severity and dependency depth.
    • Dual-Proposal Generation: Spawns two independent agent personas to develop competing fixes—one conservative minimal-diff and one structural refactor.
    • Adversarial Red-Teaming: Subjects every proposed fix to cross-examination to catch hidden edge cases or new regression paths.
    • Web-Verified Arbitration: Scores fixes against live CVE data and framework documentation using a weighted 100-point rubric.
    • Safe Remediation: Implements verified patches with automatic rollback triggers if test suites or linters fail post-patch.

    How it works

    1. Initialize Audit: Run the scanner script to generate a call-graph map and identify candidate vulnerabilities.
    2. Execute Triage: Use the report manager to import findings and partition them by risk level and confidence score.
    3. Conduct Debate: Generate Alpha and Beta proposals for complex issues, then trigger a cross-critique between agents.
    4. Arbitrate and Apply: Select the winning remediation based on security closure and compatibility, then apply the patch.
    5. Verify and Finalize: Run post-patch scans and tests; render the final interactive HTML dashboard and Markdown ledger.

    Frameworks & tools

    This skill utilizes Python-based AST analysis and call-graph mapping. It integrates with Git for version control snapshots and leverages Chart.js for rendering the interactive visual audit dashboard.

    Why this beats prompting it yourself

    Generic prompts lack the adversarial "check and balance" required for production code. This skill forces two agents to compete, preventing the "anchoring bias" where an AI sticks to its first (often flawed) idea. The built-in rollback guardrail ensures that a failed fix is automatically reverted before it can pollute your repository.

    Use cases

    • Auditing a repository for security vulnerabilities before a major production release.
    • Cleaning up technical debt and dead code following a large-scale project migration.
    • Resolving complex concurrency or architectural bugs that single-pass AI prompts cannot solve.
    • Generating documented audit reports with CWE/CVE citations for compliance requirements.

    Known limitations

    Static analysis may flag false positives in dynamic frameworks like Django or FastAPI where routes are decorated. Requires a functional local Python environment to run the bundled CLI utilities.

    May flag false positives in dynamic frameworks (e.g. FastAPI/Django) where call sites are hidden. Requires local Python 3 for AST scanning and report management scripts.

    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 any payment.

    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

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed today

    Requires

    Node.js
    Python
    Git

    Permissions

    Terminal / Shell
    Network Access
    Read Files
    Write Files
    Listedtoday

    What's inside

    Frequently Asked Questions

    Unlike single-prompt tools that may 'hallucinate' a fix, this skill uses two independent agents to propose competing solutions and a third to arbitrate, ensuring every patch is stress-tested before application.

    The skill includes a 'Blast-Radius Triage' system that identifies how a change in one module affects others, preventing the common issue of fixing one bug only to break three other dependencies.

    You will receive the core multi-agent pipeline scripts, the AST/call-graph auditing engine, CLI utilities for local execution, and templates for the interactive HTML audit dashboards.

    It is highly effective for Python-based projects, though its static analysis component may flag false positives in dynamic frameworks like Django or FastAPI where routes are handled via decorators.

    No, safety is built-in; the skill integrates with Git to take snapshots before any changes are made and includes automatic rollback triggers if your test suites or linters fail post-patch.

    New in Code Quality & Review