From mercury
Full audit-fix-judge workflow powered by Inception Mercury-2. Asks whether this is a standard scan or goal-driven audit, creates a git branch, runs the audit, then kicks off the fixer→judge loop until all critical/high findings are resolved. Use whenever the user wants to audit, debug, or improve a codebase — including when they describe a problem like 'this isn't working' or 'profits aren't locking in'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mercury:mercury-auditThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Resolve the project directory from the argument or ask. Expand `~`. Verify it exists.
Resolve the project directory from the argument or ask. Expand ~. Verify it exists.
Check INCEPTION_API_KEY is set:
echo "${INCEPTION_API_KEY:+set}"
If blank, stop and tell the user to export it.
Ask exactly this:
Do you have a specific goal or problem in mind for this audit? — If YES: describe what you're trying to achieve or what isn't working (e.g. "sim trades started at $50, now at $50.28 after 2 days — not locking profits"). — If NO: I'll run a full standard audit.
If the user provides a goal prompt:
blocks_goal: true.--goal.If no goal:
BRANCH="audit/mercury-$(date +%Y%m%d-%H%M%S)"
cd "<project_dir>"
git checkout -b "$BRANCH"
echo "branch: $BRANCH"
If the directory is not a git repo, skip branching and note it.
Compute the plugin directory and run the audit script:
SKILL_DIR="$(dirname "${BASH_SOURCE[0]}")"
PLUGIN_DIR="$(cd "$SKILL_DIR/../../.." && pwd)"
AUDIT_SCRIPT="$PLUGIN_DIR/scripts/mercury_audit.py"
Standard:
python3 "$AUDIT_SCRIPT" "<project_dir>" --split-by dir --label "<label>"
Specialized (with goal):
python3 "$AUDIT_SCRIPT" "<project_dir>" --split-by dir --label "<label>" \
--goal "<user goal verbatim>"
Stream stdout. Reports land in <project_dir>/mercury_<label>_*_report.md.
The manifest is at <project_dir>/mercury_<label>_manifest.json.
Read all mercury_*_report.md files from the manifest. Present inline:
## Mercury Audit — <project> | <branch>
Audit type: Standard | Specialized (goal: "<goal>")
### 🔴 Critical & High Findings
| # | Sev | Blocks Goal | Category | File | Symbol | Issue |
|---|-----|-------------|----------|------|--------|-------|
### Suggested Next Steps & Milestones
<from the report's milestone section>
### Feasibility Verdict
<paragraph>
### Full reports
- <paths>
For specialized audits, surface blocks_goal: true findings at the top, labeled 🎯.
After presenting findings, ask:
Run the fix-and-judge loop on Critical/High findings? I'll spawn a Fixer agent to implement fixes, then judge each one before marking it complete. No fix is closed until I sign off with zero regressions. [Y / N / just the goal-blocking findings]
If the user says yes (or "goal-blocking only"), hand off to the mercury-fix-loop skill with:
npx claudepluginhub mli-corp/mercury-audit --plugin mercuryCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.