skills/project-fix/SKILL.md
Implements the corrections found by /project-audit. Reads audit-report.md as spec and executes each required action. Trigger: /project-fix, apply audit corrections, fix claude project.
npx skillsauth add fearovex/claude-config project-fixInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Implements corrections found by
/project-audit. Readsaudit-report.mdas a spec and executes each required action.
Triggers: /project-fix, apply audit corrections, fix claude project, implement audit
STUB_TEMPLATES.md — SDD section template, skill stub templates, flag
markers, changelog entries. Read at execution time when applying handlers./project-audit → audit-report.md → /project-fix → /project-audit (verify)
(spec) (artifact) (apply) (verify)
audit-report.md is the INPUT. Without it this skill cannot operate.
Absolute rule: NEVER invent corrections. Only implement what is in
FIX_MANIFEST.
Verify .claude/audit-report.md exists.
| Condition | Action |
|---------------------|------------------------------------------------------------------------|
| File absent | Print "❌ .claude/audit-report.md not found — run /project-audit first" and stop. |
| File > 7 days old | Ask: "⚠️ Report is [N] days old. (1) use anyway, (2) re-audit first?" and wait. |
Three stages: manifest intake (read + validate + class), phase execution (apply by severity), final reporting (changelog + summary).
| Class | Examples | Side effects | Confirmation |
|-----------------|-----------------------------------------------------------------------|--------------|------------------------------------|
| Automatic | create missing files, append sections, add markers | yes | inside approved phase flow |
| Guided | delete duplicate local skills, optional phase decisions | yes | explicit confirmation required |
| Informational | move-to-global, language violations, deprecated/unknown manifest | no | report only |
Class beats handler name. Informational items never gain automatic mutation behavior just because they appear in the manifest.
Explicit. Current rules:
.claude/commands/ is skipped (deprecated).move-to-global is informational only. No automated writes to ~/.claude/skills/.Read the FIX_MANIFEST block from audit-report.md. Extract:
required_actions.critical[], .high[], .medium[], .low[]missing_global_skills[]orphaned_changes[]violations[]skill_quality_actions[] (Dimension 9 — may be absent)Classify each item as automatic, guided, or informational per the table above.
Deprecated/unsupported/unknown action types are reported as
skipped or recommendation only. The rest of the run continues.
Present the summary:
📋 Fix Plan — [Project Name]
Based on audit from [date]
Current score: [XX]/100
Actions to execute:
❌ Critical : [N] actions
⚠️ High : [N] actions
ℹ️ Medium : [N] actions
💡 Low : [N] actions (optional)
Execute corrections?
S → All recommended (critical + high + medium)
C → Critical only
R → Review one by one
N → Cancel
Wait for the user.
Phases run in severity order. Each phase ends with a checkpoint requiring confirmation before the next.
Mode detection (once): call mem_context. Reachable → engram mode.
Unreachable → none mode.
| Action | Type | Handler |
|--------|------|---------|
| 1.1 Create missing global SDD skills | install_skill | Notify only — cannot create automatically. List what is missing and the expected path. |
| 1.2 Add SDD section to CLAUDE.md | update_file section: sdd_section | Append the SDD section from STUB_TEMPLATES.md. |
Checkpoint: present executed criticals; ask to continue to Phase 2.
| Action | Type | Handler |
|--------|------|---------|
| 2.1 Create missing memory files | create_file target: ai-context/[file].md | Generate real content from project (see below). |
| 2.2 Update stack in CLAUDE.md | update_file section: tech_stack | If declared versions diverge from package.json, rewrite the Tech Stack table with real values. |
| 2.3 Fix Skills registry | add_registry_entry / remove_registry_entry | Add disk-only skills to registry. Mark [MISSING FILE] for registry-only entries (do NOT remove them). |
Memory file generation rules (2.1):
stack.md — read package.json/pyproject.toml, output dependency table with real versions.architecture.md — read folder structure + config files; document detected pattern.conventions.md — sample 3–5 existing code files; infer and document real conventions.known-issues.md — start with ## Production Safety Rules section; leave the rest as structured stubs.changelog-ai.md — initial entry documenting this fix run.Checkpoint: present executed highs; ask to continue to Phase 3.
| Action | Handler |
|--------|---------|
| 3.1 Add missing CLAUDE.md sections | If Unbreakable Rules, Plan Mode Rules, Quick Reference are missing, add with content inferred from the project. |
| 3.2 Update Folder Structure | Add .claude/ subdirectories that exist but are not documented. |
| 3.3 Fix broken cross-references | Destination should exist → create with minimal content. Path misspelled → fix the path. |
Checkpoint: present executed mediums; offer Phase 4.
| Action | Handler |
|--------|---------|
| 4.1 Recommend global tech skills | List each recommended skill and the exact command: /skill-add <name>. Never auto-install. |
| 4.2 Notify architecture violations | List D7 violations with file:line. Never auto-fix; these are code changes requiring human review. |
Parse skill_quality_actions[]. Empty/absent → skip silently. Otherwise:
Phase 5 — Skill Quality Actions
[N] actions found in Dimension 9
Actions to process:
[N] delete_duplicate — local skills that duplicate a global skill
[N] add_missing_section — local skills missing structural sections
[N] flag_irrelevant — skills potentially irrelevant to current stack (INFO)
[N] flag_language — skills with non-English content (INFO — manual fix)
[N] move-to-global — skills recommended for promotion (manual)
Proceed with Phase 5? [Y/n]
Decline → skip Phase 5 entirely.
Phase 5 handlers:
| action_type | Class | Behavior |
|---------------|-------|----------|
| delete_duplicate | Guided | Per skill: confirm [y/N]. y → recursive delete of .claude/skills/<name>/, log changelog. N → skipped (user declined). Directory already gone → skipped (already deleted). |
| add_missing_section | Automatic | See sub-procedure below. |
| flag_irrelevant | Automatic | Read file; if first line already has the marker → skipped (already flagged). Otherwise prepend the marker from STUB_TEMPLATES.md and log changelog. |
| flag_language | Informational | Print: "ℹ️ Language violation in: [path] — translate manually. File NOT modified." Log changelog. |
| move-to-global | Informational | Print the two-tier reminder once per run, then per-skill manual promotion steps. No writes. |
add_missing_section sub-procedure:
failed (file not found). Continue.format:. Absent or unrecognized → treat as procedural. Read the skill file at repair time — do NOT trust only the FIX_MANIFEST entry.missing_sections[]:
skipped (section already present).<!-- AUDIT: stub added by project-fix marker present → skipped (stub already added).STUB_TEMPLATES.md and log changelog.Stub selection (authoritative contract in docs/format-types.md):
| Resolved format | Missing section | Stub source |
|------------------------|----------------------|---------------------------------|
| procedural (default) | ## Process | Procedural Process stub |
| reference | ## Patterns | Reference Patterns stub |
| anti-pattern | ## Anti-patterns | Anti-pattern stub |
| any | ## Rules | Rules stub |
| any | **Triggers** | Triggers stub |
Checkpoint after Phase 5:
Phase 5 complete — [N] actions processed
✅ deleted : [N]
✅ stubs added : [N]
✅ flagged irrelevant : [N]
ℹ️ language violations : [N] (manual fix required)
ℹ️ move-to-global : [N] (manual — see instructions above)
⏭️ skipped : [N]
❌ failed : [N]
Append the per-fix-run changelog entry from STUB_TEMPLATES.md to
ai-context/changelog-ai.md.
✅ Fix completed — [Project Name]
Actions executed:
✅ [N] critical
✅ [N] high
✅ [N] medium
⏭️ [N] low (informed, not auto-executed)
Files created: [list]
Files modified: [list]
SDD Status: [FULL / PARTIAL / NOT CONFIGURED]
- Engram: [✅ reachable | ❌ not reachable]
- Global SDD skills: [✅ complete | ⚠️ missing: list]
- CLAUDE.md mentions /sdd-*: [✅ yes | ✅ added]
To verify the result:
→ /project-audit (should show a higher score)
→ To start SDD: /sdd-explore <topic> or /sdd-propose <change-name>
Changes recorded in: ai-context/changelog-ai.md
audit-report.md do NOT operate — ask the user to run /project-audit first.ai-context/changelog-ai.md — each fix run is documented./project-fix twice on the same project must NOT cause duplications. Idempotency relies on heading detection AND the <!-- AUDIT: ... --> marker."Run /project-audit to verify the new score"..claude/commands/. The directory is deprecated. Any FIX_MANIFEST action targeting it (e.g. fix_commands_registry) MUST be skipped with output: "skipped — commands/ is deprecated".development
Governs AI-assisted generation of images, video, and audio (Gemini Nano Banana Pro, FLUX, etc.) from any project, with a focus on key security and cost control. Trigger: generate an image/illustration/asset with AI, "generate an image", nano banana, gemini image, generate video, configure an image API.
business
Turns an already-investigated customer issue into a short, non-technical engineering-to-CS brief: one natural message that leads with the finding (root cause, real scope, open question), ready to paste into Slack for the support team. Trigger: /support-brief, support brief, brief for support, resumen soporte.
development
Parks the current Claude Code session before going to sleep. Analyzes the conversation, writes a handoff document to docs/handoffs/ in the current project, mirrors the same summary to engram tagged with the session ID, and prints the exact `claude --resume <id>` command for tomorrow. Zero interaction — runs end-to-end on a single invocation. Trigger: /night-park, night park, park session, me voy a dormir, guardar sesion.
testing
Interactive creator for a project feature: scaffolds the domain knowledge markdown at ai-context/features/<slug>.md AND the antenna skill at .claude/skills/<slug>/SKILL.md, both from the canonical templates. Also registers the antenna in the project's CLAUDE.md. Trigger: /feature-define <name>, define feature, documentar funcionalidad, nueva feature.