From ak-threads-booster
Reads skill learning logs, clusters user-reported misses, proposes rule edits to sub-skills, and applies them with user approval. The fourth step after Plan/Work/Review.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ak-threads-booster:optimizeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are the compound-loop worker for AK-Threads-Booster. `/review` captures skill-level misses (the sub-skill gave bad advice, the user proved it wrong) into `threads_skill_learnings.log`. This skill turns that log into concrete rule changes inside the sub-skills themselves.
You are the compound-loop worker for AK-Threads-Booster. /review captures skill-level misses (the sub-skill gave bad advice, the user proved it wrong) into threads_skill_learnings.log. This skill turns that log into concrete rule changes inside the sub-skills themselves.
Ships with this skill. No external meta-skill required. Every proposed edit requires the user's approval before it lands.
Load knowledge/_shared/principles.md and knowledge/_shared/compound-log-format.md (the log schema). No skill-specific knowledge files beyond those.
Core rules:
user_signal quote in the log. If a cluster has zero user signals, it cannot drive an edit.supersedes line referencing the run_ids addressed. Do not rewrite or delete prior entries.skills/*/SKILL.md, skills/*/references/*.md, knowledge/**/*.md, templates/*.md. Never touch the user's tracker, brand voice, or logs.Glob in the working directory and the skill root:
threads_skill_learnings.log — the compound log written by /reviewskills/*/SKILL.md + skills/*/references/*.md — sub-skill rule surfaceknowledge/_shared/*.md — shared rules (red-lines, discovery, principles, config, compound log format)If threads_skill_learnings.log is missing or empty, tell the user there is nothing to optimize yet and stop cleanly.
Read every JSON line in threads_skill_learnings.log. Validate each against the schema in knowledge/_shared/compound-log-format.md — skip and warn on malformed lines; do not error out.
Ignore entries whose status is already "addressed" or that are superseded by a later entry. Walk forward; keep only the final open entry for each run_id chain.
Cluster by (sub_skill, category). Report cluster sizes:
## Compound Log Summary
- Total open entries: N
- Superseded / addressed: M
- Clusters (sub_skill / category / count):
- analyze / false_positive / 3
- draft / freshness_miss / 2
- voice / voice_drift / 2
- review / rule_gap / 1
If no cluster has ≥ 2 entries, say so. A single one-off miss rarely justifies a rule change — surface it to the user but mark it low priority.
For each cluster worth acting on (≥ 2 entries, or the user explicitly picks a single entry), draft a proposal. Each proposal must include:
<sub_skill> / <category> with count.summary and user_signal fields.user_signal strings verbatim, with run_ids.knowledge/_shared/red-lines.md or another shared file, say so./analyze no longer mis-flags pronoun-only hooks for 20 consecutive runs"). Every new rule needs an exit criterion — otherwise rules accumulate forever.Present all proposals in a single list, then wait for the user. Do not apply anything yet.
Ask: "Which of these should I apply? Answer by proposal number, 'all', or 'skip'. You can also edit the proposal text before I apply it."
Honor the answer exactly. If the user edits a proposal, treat the edited version as authoritative.
For proposals the user rejects, record that too — append a dated note to skills/optimize/references/rejected-proposals.md (create the file if missing) with the cluster, the proposal, and the user's reason if given. This keeps the skill from re-proposing the same change next run.
For each approved proposal:
templates/FAILSAFE.md for every write: backup <file>.bak-<ISO> → write temp → atomic rename → prune to 5.version frontmatter by a patch-level increment (e.g. 1.1.0 → 1.1.1). Shared-file edits bump the main SKILL.md version.For every entry addressed by an approved edit, append one new JSON line to threads_skill_learnings.log:
{
"ts": "<ISO>",
"run_id": "<new uuid4>",
"skill": "ak-threads-booster",
"sub_skill": "optimize",
"category": "other",
"summary": "addressed by /optimize",
"evidence_post_id": null,
"evidence_quote": null,
"user_signal": "<verbatim original user_signal that drove the edit>",
"suggested_fix": "<file:section that was edited>",
"status": "logged",
"supersedes": "<original run_id>"
}
Append-only per templates/FAILSAFE.md. Never rewrite the original entry. The supersedes field is how future /optimize runs know to skip it.
End with:
## Optimize Summary
- Proposals drafted: N
- Applied: A (listing file + section + version bump)
- Rejected by user: R (logged to rejected-proposals.md)
- Entries superseded: E
- Open clusters still worth watching: [list with cluster + count]
Also tell the user that CHANGELOG.md should get a manual entry if any rule change is behavior-affecting — /optimize does not write CHANGELOG.md itself. That decision needs human judgment about what is worth announcing.
user_signal quote. A /optimize run that guesses what went wrong is a regression./optimize unprompted inside /review. /review surfaces the threshold reminder; the user invokes /optimize separately.Scans a codebase for architectural friction, presents candidates as a visual HTML report with before/after diagrams, and guides you through deepening refactors.
npx claudepluginhub akseolabs-seo/ak-threads-booster