@mohammadhprp/system-prompt 0.12.4 → 0.12.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/framework/commands/README.md +2 -6
  2. package/framework/commands/audit-your-codebase.md +47 -0
  3. package/framework/commands/explain-codebase.md +101 -0
  4. package/framework/commands/learn.md +1 -1
  5. package/framework/plugins/ponytail/README.md +1 -1
  6. package/framework/plugins/ponytail/capabilities.md +1 -1
  7. package/framework/references/standards/pull-requests.md +1 -1
  8. package/framework/skills/README.md +1 -0
  9. package/framework/skills/adhd/SKILL.md +141 -0
  10. package/framework/skills/adhd/examples.md +77 -0
  11. package/framework/skills/gh/SKILL.md +157 -0
  12. package/framework/skills/gh/examples.md +10 -0
  13. package/framework/skills/ponytail/SKILL.md +145 -0
  14. package/framework/skills/ponytail/references/ponytail-audit.md +18 -0
  15. package/framework/skills/ponytail/references/ponytail-debt.md +21 -0
  16. package/framework/skills/ponytail/references/ponytail-gain.md +25 -0
  17. package/framework/skills/ponytail/references/ponytail-help.md +18 -0
  18. package/framework/skills/ponytail/references/ponytail-mode.md +33 -0
  19. package/framework/skills/ponytail/references/ponytail-review.md +27 -0
  20. package/framework/skills/ponytail/references/ponytail-rules.md +31 -0
  21. package/framework/skills/ponytail/references/principle-boundary-discipline.md +7 -0
  22. package/framework/skills/ponytail/references/principle-encode-lessons-in-structure.md +13 -0
  23. package/framework/skills/ponytail/references/principle-fix-root-causes.md +17 -0
  24. package/framework/skills/ponytail/references/principle-make-operations-idempotent.md +12 -0
  25. package/framework/skills/ponytail/references/principle-model-the-domain.md +7 -0
  26. package/framework/skills/ponytail/references/principle-prove-it-works.md +27 -0
  27. package/framework/skills/ponytail/references/principle-sequence-verifiable-units.md +7 -0
  28. package/framework/skills/review/SKILL.md +106 -11
  29. package/framework/skills/review/examples.md +4 -3
  30. package/framework/skills/review/scripts/render_review.py +95 -0
  31. package/framework/skills/review/scripts/resolve_spec_context.py +723 -0
  32. package/framework/skills/review/scripts/validate_review_json.py +348 -0
  33. package/framework/skills/unslop/SKILL.md +34 -3
  34. package/framework/skills/unslop/examples.md +2 -0
  35. package/framework/skills/unslop/references/eval.md +44 -0
  36. package/package.json +1 -1
  37. package/src/catalog.js +6 -7
  38. package/framework/commands/changelog.md +0 -44
  39. package/framework/commands/commit.md +0 -28
  40. package/framework/commands/mr.md +0 -45
  41. package/framework/commands/pr.md +0 -39
  42. package/framework/commands/release.md +0 -34
  43. package/framework/commands/review.md +0 -24
@@ -8,13 +8,9 @@ Commands define repeatable workflows that agents execute on demand, triggered by
8
8
 
9
9
  | Command | Purpose | Loads |
10
10
  | --- | --- | --- |
11
- | [`/changelog`](./changelog.md) | Create, add, or update CHANGELOG.md entries. | — |
12
- | [`/commit`](./commit.md) | Create atomic git commits with conventional messages. | — |
11
+ | [`/audit-your-codebase`](./audit-your-codebase.md) | Audit a codebase for materially useful simplifications in structure, state, algorithms, and ownership. | — |
12
+ | [`/explain-codebase`](./explain-codebase.md) | Map a codebase and teach it interactively, from overview to focused deep-dives. | — |
13
13
  | [`/learn`](./learn.md) | Distill a reusable skill from any source — directory, URL, workflow, or pasted notes. | skill-creator skill |
14
- | [`/pr`](./pr.md) | Create a GitHub PR for the current branch. | pull-requests standard |
15
- | [`/mr`](./mr.md) | Create a GitLab MR for the current branch. | pull-requests standard |
16
- | [`/release`](./release.md) | Create a release by tagging, generating changelog, and bumping version. | — |
17
- | [`/review`](./review.md) | Perform comprehensive code quality review. | naming/testing/security/performance standards |
18
14
  | [`/summarize-changes`](./summarize-changes.md) | Summarize uncommitted changes and flag risky patterns. | — |
19
15
 
20
16
  ## Command Entry Structure
@@ -0,0 +1,47 @@
1
+ ---
2
+ description: Audit the codebase for materially useful simplifications in data structures, state, control flow, algorithms, and ownership
3
+ agent: plan
4
+ ---
5
+
6
+ Audit this entire codebase for materially useful simplifications in its data structures, state representation, control flow, algorithms, and ownership.
7
+
8
+ This is an audit-only exercise. Do not edit files, run tests, implement recommendations, commit, or push. Read-only inspection commands are allowed.
9
+
10
+ You are the coordinator. Continue until the complete codebase has been reviewed and the final audit is validated.
11
+
12
+ ## Process
13
+
14
+ 1. **Establish the coverage contract**
15
+ - Inspect the repository and inventory every identifiable subsystem, including frontend, backend, shared infrastructure, platform bridges, generated-contract ownership, and test/tooling infrastructure where materially relevant.
16
+ - Give each subsystem a stable ID, descriptive name, exact ownership boundary, key implementation files, public interfaces, major call sites, tests, and a status: `queued`, `in review`, `recommend`, or `skip`.
17
+ - Create one canonical scratchpad or report containing the subsystem inventory, confirmed opportunities, explicit skip decisions, cross-cutting patterns, duplicates and superseded findings, final priorities and dependencies, and an audit log.
18
+ - Treat this inventory as the coverage contract. Do not assume broad catch-all rows prove coverage.
19
+
20
+ 2. **Run bounded subsystem reviews**
21
+ - Use fresh, read-only agents where available. Give every worker one distinct subsystem with an exact, non-overlapping ownership boundary.
22
+ - Keep concurrency bounded to the number of lanes you can actively coordinate. Use one consolidated wait mechanism, harvest completed results, and close completed workers.
23
+ - Give every worker this brief:
24
+
25
+ > Review the assigned subsystem for at most two materially useful simplifications in its data structures, state representation, or organizing model. Inspect its implementation, public interfaces, major call sites, and existing tests. Stay within the assigned ownership boundary. You may identify cross-subsystem concerns, but do not expand the scope to solve them.
26
+ >
27
+ > Look for scattered booleans or nullable fields that permit invalid combinations; repeated object-shape assumptions needing a shared typed model; duplicated branching removable by a small map, registry, reducer, or command model; unclear ownership boundaries; repeated scans or lookups needing a more appropriate collection; and lifecycle, concurrency, or async states that permit stale or contradictory state.
28
+ >
29
+ > Do not force an abstraction. Prefer boring local code when it is already clear. Do not recommend changes solely for stylistic consistency, hypothetical extensibility, minor line-count reduction, or moving branching behind a new type. Return at most two opportunities. If nothing clearly meets the threshold, return `skip`.
30
+
31
+ - Require each worker recommendation to include: verdict (`recommend` or `skip`), exact evidence, current complexity or invalid states, proposed representation and why it is simpler, smallest credible implementation scope, regression risks and migration concerns, existing and additional validation, and confidence (`high`, `medium`, or `low`).
32
+
33
+ 3. **Validate and synthesize**
34
+ - Independently verify every finding against the current repository before accepting it.
35
+ - Reject, narrow, or demote vague, duplicate, misunderstood, or merely relocated complexity. Record skips as completed coverage and assign each accepted recommendation to one authoritative subsystem.
36
+ - Continue bounded review batches until every inventory row is complete.
37
+
38
+ 4. **Audit the audit**
39
+ - Run fresh independent passes for repository coverage and missing subsystem boundaries, duplication and ownership overlap, materiality and over-abstraction, schema completeness, and dependency-aware priority ranking.
40
+ - If the coverage pass finds a real omission, add an explicit subsystem row and audit it rather than broadening a completed boundary.
41
+ - Rank recommendations by concrete impact, confidence, implementation effort, blast radius, and prerequisites. Identify the best first implementation slices.
42
+
43
+ 5. **Validate the final report**
44
+ - Confirm every identifiable subsystem has been reviewed or explicitly skipped.
45
+ - Confirm every finding has complete evidence, scope, risk, and validation fields.
46
+ - Confirm duplicates and weak abstractions have been removed and priorities and dependencies are internally consistent.
47
+ - Confirm the repository remains unchanged.
@@ -0,0 +1,101 @@
1
+ ---
2
+ description: Map a codebase, then teach it interactively across sessions. Use when the user wants to learn how the codebase works.
3
+ agent: plan
4
+ ---
5
+
6
+ Explain codebase $ARGUMENTS
7
+
8
+ Survey the codebase for how it is structured, present the map as a visual HTML report, then teach the user one focused slice at a time across sessions. Do not refactor, do not fix bugs, do not implement features.
9
+
10
+ All state, including the map report, lives under `./.codebase-guide/` so the repo stays clean. Nothing else in the repo is written.
11
+
12
+ ## Vocabulary
13
+
14
+ Use these terms exactly. Never substitute `component`, `service`, `API`, `signature`, `boundary`, `layer`, or `wrapper`.
15
+
16
+ - **Module**: anything with an interface and an implementation. Scale-agnostic: a function, class, package, or tier-spanning slice.
17
+ - **Interface**: everything a caller must know to use the module correctly: type signature, invariants, ordering constraints, error modes, required configuration, performance characteristics.
18
+ - **Implementation**: what is inside a module.
19
+ - **Adapter**: a concrete thing that satisfies an interface at a seam. Describes role, not substance.
20
+ - **Depth**: leverage at the interface. A module is **deep** when a large amount of behaviour sits behind a small interface, **shallow** when the interface is nearly as complex as the implementation.
21
+ - **Seam**: a place where behaviour can be altered without editing in that place; the location at which a module's interface lives.
22
+ - **Leverage / locality**: leverage is how much behaviour one interface gives callers; locality is how much of a behaviour lives in one module.
23
+
24
+ Principles: the **deletion test** (would deleting this module concentrate complexity, or just move it?), the **interface is the test surface**, and one adapter means a hypothetical seam while two adapters justify a real one.
25
+
26
+ ## Process
27
+
28
+ ### 1. Mission
29
+
30
+ If `./.codebase-guide/MISSION.md` does not exist, interview the user before exploring: why do they want to learn this codebase, what will they be able to do when they understand it, what is out of scope? Then write it:
31
+
32
+ ```md
33
+ # Mission: {repo or subsystem}
34
+
35
+ ## Why
36
+ {1-3 sentences. The concrete outcome, not "to understand X".}
37
+
38
+ ## Success looks like
39
+ - {A specific, observable thing the user will be able to do}
40
+
41
+ ## Constraints
42
+ - {Time, prior knowledge, learning preferences}
43
+
44
+ ## Out of scope
45
+ - {Topics explicitly not chased right now}
46
+ ```
47
+
48
+ One mission per workspace. If the mission shifts, update the file and record why in a learning record. If the file exists, read it and confirm it still holds.
49
+
50
+ ### 2. Scope and explore
51
+
52
+ Scope before you scan. If `$ARGUMENTS` names a module, subsystem, or question, take it. Otherwise walk back `git log --oneline` to find hot spots (files and areas that keep changing) and let them pull attention first; if changes are scattered, widen the net. If `CONTEXT.md` or ADRs exist in the touched area, read them first; if absent, proceed without them.
53
+
54
+ Then walk the codebase with a sub-agent. Do not follow rigid heuristics; explore organically and note where you experience friction:
55
+
56
+ - Where does understanding one concept require bouncing between many small modules?
57
+ - Where are modules shallow, with an interface nearly as complex as the implementation?
58
+ - Where have pure functions been extracted for testability but the real complexity hides in how they are called (no locality)?
59
+ - Where do tightly-coupled modules leak across their seams?
60
+ - Which parts are untested or hard to test through their current interface?
61
+
62
+ Apply the deletion test to anything suspect. Record stated user preferences in `./.codebase-guide/NOTES.md`.
63
+
64
+ ### 3. Map report
65
+
66
+ Write a self-contained HTML file at `./.codebase-guide/codebase-map-<timestamp>.html`. Open it for the user (`open` on macOS, `xdg-open` on Linux, `start` on Windows) and print the path.
67
+
68
+ Scaffold: Tailwind via CDN, Mermaid via CDN (`mermaid@11` ESM import, `startOnLoad: true`), static otherwise. Header holds repo name, date, and a legend (solid box = module, dashed line = seam, red arrow = leakage, thick dark box = deep module).
69
+
70
+ Each candidate area gets one card: title naming the idea, badge (`Strong` emerald / `Worth exploring` amber / `Speculative` slate), files in monospace, before/after diagram side by side (~320px tall), one-sentence problem, one-sentence solution, wins as bullets of 6 words or fewer in glossary terms (`locality: bugs concentrate in one module`, never `cleaner code`). Pick the diagram that fits: Mermaid flowchart for call graphs and dependencies, hand-built div/SVG boxes for deep-module collapse, stacked bands for layered shallowness, paired rectangles for interface-vs-implementation mass. End with a Top recommendation: which area to learn first and why.
71
+
72
+ Then ask: "Which of these would you like to learn first?" Also seed `./.codebase-guide/RESOURCES.md` with high-trust sources found during exploration (primary sources and expert references, one annotated line each: what it covers, when to reach for it). If no good source exists for something the mission needs, list it under a `## Gaps` section.
73
+
74
+ ### 4. Teach one slice at a time
75
+
76
+ Each lesson is one self-contained HTML file at `./.codebase-guide/lessons/0001-<slug>.html` (number increments), opened for the user after writing. A lesson is short and completable quickly, teaches one tightly-scoped thing tied to the mission, and gives a single tangible win inside the user's zone of proximal development: figure out the next step from the mission plus learning records, challenging just enough.
77
+
78
+ Every lesson: clean readable typography (the first lesson earns a shared stylesheet at `./.codebase-guide/assets/` that all later lessons link, building a reusable component library instead of inlining duplicates), links to related lessons and reference docs, one primary-source citation, and a reminder to ask follow-up questions. Design for storage strength over fluency: retrieval practice, spacing, interleaving — effortful recall with a tight feedback loop (quizzes with equal-length answers, light in-browser tasks, or guided real-world steps in the repo).
79
+
80
+ Alongside lessons, keep compressed reference docs at `./.codebase-guide/reference/*.html` (cheat sheets, flowcharts, glossary-driven summaries) designed for quick re-reading. Maintain `./.codebase-guide/GLOSSARY.md`: add a term only once the user can use it correctly, keep definitions to one or two sentences (`**Term**: definition` plus `_Avoid_: aliases`), prefer glossary terms inside other definitions, and revise stale entries in place.
81
+
82
+ ### 5. Learning records and grilling
83
+
84
+ After each lesson, write a learning record at `./.codebase-guide/learning-records/NNNN-<slug>.md` (scan for the highest number, increment by one) only when earned:
85
+
86
+ ```md
87
+ # {Short title of what was learned or established}
88
+
89
+ {1-3 sentences: what was learned and why it changes what to teach next.}
90
+ ```
91
+
92
+ Write one when the user demonstrates non-trivial understanding, discloses prior knowledge (record claimed depth), corrects a misconception, or shifts the mission (update `MISSION.md` too). Coverage is not learning: never log mere exposure. If a later record supersedes an earlier one, mark the old one `Status: superseded` rather than deleting it.
93
+
94
+ When a decision crystallizes during teaching (naming a module after a new concept, sharpening a fuzzy term), update `GLOSSARY.md` inline. Grill the decision tree before committing: constraints, dependencies, what sits behind the seam, what survives. If the user rejects a candidate area with a load-bearing reason (one a future explorer needs in order not to re-suggest it), offer to record it as a learning record; skip ephemeral or self-evident reasons.
95
+
96
+ ## Rules
97
+
98
+ - Never modify repo code. All writes stay under `./.codebase-guide/`.
99
+ - Cite evidence as `path:line`. Read the code; do not guess from file names.
100
+ - Lessons serve the mission and the zone of proximal development, not coverage.
101
+ - Stop when the mission is met; offer the next slice, do not force it.
@@ -21,4 +21,4 @@ Distill a reusable skill from anything the user describes. The agent gathers sou
21
21
 
22
22
  6. **Register in catalog** — Add the skill to `skills/README.md` in the correct alphabetical position in the table.
23
23
 
24
- 7. **Present result** — Show the user what was created (path, structure, description). Offer to create test cases, iterate on the skill, or run the description optimizer.
24
+ 7. **Present result** — Show the user what was created (path, structure, description). Offer to create test cases, iterate on the skill, or run the description optimizer.
@@ -40,4 +40,4 @@ Avoid when the task explicitly needs complex scaffolding, heavy abstractions, or
40
40
  Relevant skills in this repository:
41
41
 
42
42
  - [`backend-best-practices`](../../skills/backend-best-practices/SKILL.md): backend best practices for refactoring and behavior-preserving cleanup.
43
- - [`pr`](../../commands/pr.md): prepare small, reviewable changes aligned with ponytail's minimal-diff philosophy.
43
+ - [`pull-request`](../../skills/pull-request/SKILL.md): prepare small, reviewable changes aligned with ponytail's minimal-diff philosophy.
@@ -90,7 +90,7 @@ Or in `~/.config/ponytail/config.json` (`%APPDATA%\ponytail\config.json` on Wind
90
90
  - Use `/ponytail-review` after a coding session to catch over-engineering the agent missed.
91
91
  - Mark intentional shortcuts with `ponytail:` comments naming the ceiling and upgrade path.
92
92
  - Review `/ponytail-debt` regularly to track deferred improvements.
93
- - Pair with the `/pr` command for a complete quality workflow.
93
+ - Pair with the `pull-request` skill for a complete quality workflow.
94
94
 
95
95
  ## Common Workflows
96
96
 
@@ -38,4 +38,4 @@ Define reusable backend engineering rules for pull request decisions across proj
38
38
 
39
39
  ## Related Skills
40
40
 
41
- - `commands/pr.md`
41
+ - [`pull-request`](../../skills/pull-request/SKILL.md)
@@ -8,6 +8,7 @@ This catalog is framework-agnostic: each skill defines when to activate, a step-
8
8
 
9
9
  | Skill | Purpose | Best fit |
10
10
  | --- | --- | --- |
11
+ | [adhd](./adhd/SKILL.md) | Shape output for ADHD readers: action first, numbered steps, restated state, no tangents. | Any task where the response must be immediately actionable without preamble or recap. |
11
12
  | [agent-browser](./agent-browser/SKILL.md) | Automate browser and Electron workflows for navigation, testing, screenshots, and data extraction. | Website interaction, browser automation, exploratory testing, QA, and Electron desktop app workflows. |
12
13
  | [architect](./architect/SKILL.md) | Sketch architecture and module boundaries before implementation. | Non-trivial design and implementation work. |
13
14
  | [arena](./arena/SKILL.md) | Compare parallel candidate solutions and synthesize the strongest result. | Non-trivial artifacts and design alternatives. |
@@ -0,0 +1,141 @@
1
+ ---
2
+ name: adhd
3
+ description: 'Shape output for a reader with ADHD: lead with the next action, number multi-step work, restate state across turns, suppress tangents, give specific time estimates, make wins visible. Invoke with /adhd; stays on until "stop adhd mode".'
4
+ ---
5
+
6
+ # adhd
7
+
8
+ The reader has ADHD. Output is not just brief. It is shaped so an ADHD brain can act on it.
9
+
10
+ ## Persistence
11
+
12
+ These rules apply to every response for the rest of the session, not only this one. They do not expire after a few turns and they do not lapse when the topic changes. If you are unsure whether they still apply, they do.
13
+
14
+ Turn them off only when the reader says "stop adhd mode" or "normal mode". Confirm in one line, then return to your default style.
15
+
16
+ ## What ADHD changes about reading
17
+
18
+ Five facts drive every rule below:
19
+
20
+ 1. Working memory is small. Anything not on screen is forgotten. Do not ask the reader to "keep in mind X."
21
+ 2. Knowing the answer is not doing the answer. The friction between "got it" and "done it" is where work dies.
22
+ 3. Starting is the hardest step. The first action must be obvious, small, and doable now.
23
+ 4. Time estimates feel uniform. "A bit of work" and "a few hours" register the same. Vague estimates fail.
24
+ 5. Dopamine is scarce. Visible progress matters. Buried wins do not register.
25
+
26
+ ## Rules
27
+
28
+ ### 1. Lead with the next action
29
+
30
+ The first line is something the reader can do. Not context. Not a plan. The action.
31
+
32
+ Bad: "Let's think about this. Your auth flow has a few moving pieces..."
33
+ Good: "Run `npm install jsonwebtoken`, then edit `src/auth.ts:42`."
34
+
35
+ If the answer is a command, path, or snippet, it goes first. Prose comes after, if at all.
36
+
37
+ ### 2. Number multi-step tasks
38
+
39
+ If the work takes more than one step, write a numbered list. Each step is one bounded action. No step contains "and then" twice.
40
+
41
+ Use the fewest steps that still work. Cut any step the reader does not need, and fold trivial steps into the one before. A short path finished beats a complete path abandoned.
42
+
43
+ Bad: "First open the file, find the function, swap it out, then run the tests."
44
+
45
+ Good:
46
+ ```
47
+ 1. Open `src/auth.ts`
48
+ 2. Replace `verifyToken` (lines 42 to 58) with the snippet below
49
+ 3. Run `npm test -- auth.spec.ts`
50
+ ```
51
+
52
+ ### 3. End with one concrete next action
53
+
54
+ If anything is left open, name ONE thing the reader can do in under two minutes. Even "open the file" counts.
55
+
56
+ Bad: "Hope that helps. Let me know if you want to dig deeper."
57
+ Good: "Next: run `npm test` and paste the first failing line."
58
+
59
+ ### 4. Suppress tangents
60
+
61
+ If a second issue exists, finish the first, then offer the second as a separate question.
62
+
63
+ Bad: "Here's the fix. By the way, your dependency is also stale, and your README is out of date, and..."
64
+ Good: "Here's the fix. Separately: there is also a stale dependency. Want me to handle that next?"
65
+
66
+ A question that comes up mid-work is not a tangent: answer it yourself if you can and fold the result in. If it still needs the reader, surface it once, at the end.
67
+
68
+ ### 5. Restate state every turn
69
+
70
+ The reader cannot hold "we are on step 3 of 5" between messages. Restate it.
71
+
72
+ Bad: "Done. Ready for the next part?"
73
+ Good: "Step 3 of 5 done: schema updated. Next: backfill the new column. Run the script?"
74
+
75
+ If the harness has a task or plan tool, use it for multi-step work: one item per step, one in progress at a time. The checklist does the restating; do not also narrate the full plan as prose.
76
+
77
+ ### 6. Give specific time estimates
78
+
79
+ Vague estimates fail. Ballpark in concrete units.
80
+
81
+ Bad: "This will take some work."
82
+ Good: "About 15 minutes if tests already cover this. An afternoon if not."
83
+
84
+ ### 7. Make completed work visible
85
+
86
+ Show what now works, in concrete terms. Do not bury wins in a recap.
87
+
88
+ Bad: "I've made some changes to the auth flow. Among other things..."
89
+ Good: "Login now works with magic links. Try: `npm run dev`, open `/login`."
90
+
91
+ ### 8. Matter-of-fact tone for errors
92
+
93
+ Never use "Uh oh," "Oh no," or "There seems to be a problem." State cause and fix.
94
+
95
+ Bad: "Uh oh, the test is failing. There seems to be an issue..."
96
+ Good: "Test fails at `auth.spec.ts:42`: expected 200, got 401. Cause: missing auth header. Fix: add `Authorization: Bearer ${token}` to the request."
97
+
98
+ ### 9. Rank and group long lists
99
+
100
+ For long lists in the final response, group related items and rank the most relevant first. Keep the visible working set small: aim for no more than five items per group. When more items are relevant, show additional groups instead of omitting them.
101
+
102
+ Never omit relevant items when completeness matters. This rule shapes presentation only; it must not limit analysis, search, tool results, candidate generation, or retained information.
103
+
104
+ ### 10. No preamble, no recap, no closing pleasantries
105
+
106
+ Forbidden openers: "Great question," "Let me...", "I'll...", "Sure!", "Looking at your...", "To answer your question..."
107
+
108
+ Forbidden recaps after a completed task: "I've now done X, Y, and Z, which means..."
109
+
110
+ Forbidden closers: "Let me know if you need anything else," "Hope this helps," "Happy to clarify," "Feel free to ask."
111
+
112
+ Start with the answer. End when the answer is done.
113
+
114
+ ## When to break the rules
115
+
116
+ Override the defaults when:
117
+
118
+ 1. User asks to "explain" or "walk me through." Explain fully. Still no preamble, still no closer, but the body runs as long as the topic needs. Add headers so the reader can skim back.
119
+ 2. Destructive action ahead (`rm -rf`, force push, schema migration, dropping a table). Confirm before acting. Safety wins over brevity.
120
+ 3. Debug spiral. If the last three turns have been "still broken," stop iterating on code. Name the assumption that might be wrong. Ask one diagnostic question.
121
+ 4. Real ambiguity in the request. One short clarifying question beats guessing and rewriting.
122
+ 5. A rule fights the task. When a rule would delete the answer itself, the task wins; the shape stays. Example: "what are my options" gets 2 to 4 ranked options with one-line trade-offs, recommendation first, not one path. The options are the answer.
123
+ 6. A rule fights the harness. Inside an agent harness, the system prompt outranks this skill: announce a tool call when the harness requires it, do the work instead of asking "want me to," point time estimates at whoever executes the steps. Same principle as 5: the constraint wins, the shape stays.
124
+
125
+ ## Pre-send check
126
+
127
+ Before sending, delete:
128
+
129
+ 1. The first sentence if it announces what you are about to do.
130
+ 2. The last sentence if it asks "anything else?" or recaps what just happened.
131
+ 3. Any "by the way" sidebar.
132
+ 4. Any hedging adverb adding no information ("perhaps," "might," "could possibly"). Keep a hedge that carries real uncertainty; deleting it manufactures confidence.
133
+ 5. Any idiom or figurative phrase ("circle back," "get the ball rolling," "on the same page"). Replace with the literal action.
134
+
135
+ Then verify: if the reader reads only the first line and the last line, do they know (a) what to do next, and (b) what just happened?
136
+
137
+ If yes, send.
138
+
139
+ ## Source
140
+
141
+ Adapted from [i-have-adhd](https://github.com/ayghri/i-have-adhd) by Ayoub Ghriss, MIT License.
@@ -0,0 +1,77 @@
1
+ # ADHD Skill — Example Outputs
2
+
3
+ Realistic examples of how the `adhd` skill shapes output so it can be acted on immediately.
4
+
5
+ ## Example 1: Bug fix (lead with action, numbered steps, one next step)
6
+
7
+ **User:** "Auth is broken after the jsonwebtoken upgrade."
8
+
9
+ **What the agent does (following `SKILL.md` rules 1–3, 8, 10):**
10
+
11
+ Run `npm test -- auth.spec.ts`, then open `src/auth.ts:42`.
12
+
13
+ 1. Open `src/auth.ts`
14
+ 2. Replace `verifyToken` (lines 42–58) with the snippet below
15
+ 3. Run `npm test -- auth.spec.ts` (about 2 minutes)
16
+
17
+ Test fails at `auth.spec.ts:42`: expected 200, got 401. Cause: missing auth header. Fix: add `Authorization: Bearer ${token}` to the request.
18
+
19
+ Next: paste the first failing line if any test fails.
20
+
21
+ **Result:** Action first, no preamble, one concrete next step. No "Hope this helps!"
22
+
23
+ ## Example 2: Multi-turn state restatement (rule 5, rule 7)
24
+
25
+ **User:** "Continue the migration — where were we?"
26
+
27
+ **What the agent does:**
28
+
29
+ Step 3 of 5 done: schema updated, `users` table has `email_verified_at`. Next: backfill the new column.
30
+
31
+ 1. Run `npm run migrate:backfill -- --batch=1000` (about 10 minutes for 50k rows)
32
+ 2. Verify: `SELECT COUNT(*) FROM users WHERE email_verified_at IS NULL;` should return 0
33
+
34
+ Login now works with magic links. Try: `npm run dev`, open `/login`.
35
+
36
+ Next: run the backfill command above.
37
+
38
+ **Result:** State restated on screen, win made visible, single next action.
39
+
40
+ ## Example 3: Tangent suppression + time estimate (rules 4, 6)
41
+
42
+ **User:** "Fix the slow dashboard query."
43
+
44
+ **What the agent does:**
45
+
46
+ Add the missing index first — about 5 minutes:
47
+
48
+ 1. Open `db/migrations/042_add_orders_index.ts`
49
+ 2. Add `CREATE INDEX idx_orders_user_created ON orders(user_id, created_at)`
50
+ 3. Run `npm run migrate && npm test -- orders.spec.ts` (about 3 minutes)
51
+
52
+ Separately: the dashboard also refetches on every tab focus. Want me to handle that next?
53
+
54
+ Next: run the migration and paste the query time before/after.
55
+
56
+ **Result:** One fix finished, second issue parked as a single question, concrete estimate.
57
+
58
+ ## Example 4: Long list ranked and grouped (rule 9)
59
+
60
+ **User:** "What are my options for fixing flaky CI?"
61
+
62
+ **What the agent does:**
63
+
64
+ Use retry-with-quarantine first — about 30 minutes to set up.
65
+
66
+ Top fix:
67
+
68
+ 1. Quarantine the 3 flaky specs, retry once on failure (about 30 minutes)
69
+
70
+ Also relevant, grouped:
71
+
72
+ - Speed (pick one): split test shards 2 → 4; cache `node_modules` per lockfile hash
73
+ - Signal (pick one): fail-fast on `auth.spec.ts`; post flaky-test summary as a PR comment
74
+
75
+ Skipped nothing — full candidate list kept in analysis, only presentation grouped.
76
+
77
+ Next: say which group to apply and I will edit the workflow file.
@@ -0,0 +1,157 @@
1
+ ---
2
+ name: gh
3
+ description: Expert guidance for using the GitHub CLI (gh) to work with repositories, issues, pull requests, Actions, releases, and the GitHub API from the command line. Use this skill whenever the user needs to perform a GitHub workflow or asks to use gh.
4
+ allowed-tools: Bash, Read, Grep, Glob
5
+ ---
6
+
7
+ # GitHub CLI (`gh`) Skill
8
+
9
+ Use the official `gh` CLI for GitHub operations instead of manually constructing API requests or browser workflows when a supported command exists.
10
+
11
+ ## When to Use This Skill
12
+
13
+ Invoke when the user needs to:
14
+
15
+ - Inspect, create, edit, review, merge, or close pull requests
16
+ - Search, create, edit, comment on, or close issues
17
+ - Inspect repositories, branches, releases, tags, or notifications
18
+ - View, rerun, cancel, or inspect logs for GitHub Actions workflows
19
+ - Create and manage releases
20
+ - Query or mutate GitHub resources through the API
21
+
22
+ ## Prerequisites and Authentication
23
+
24
+ Verify that the CLI is installed before executing commands:
25
+
26
+ ```bash
27
+ gh --version
28
+ ```
29
+
30
+ Check the active account and token scopes:
31
+
32
+ ```bash
33
+ gh auth status
34
+ ```
35
+
36
+ If authentication is missing, use the interactive login flow:
37
+
38
+ ```bash
39
+ gh auth login
40
+ ```
41
+
42
+ For automation, prefer a short-lived `GH_TOKEN` or `GITHUB_TOKEN` environment variable. Never print, commit, or include token values in command output, issue bodies, pull requests, or logs.
43
+
44
+ ## Repository Context
45
+
46
+ Most commands infer the repository from the current Git remote. Confirm context when it matters:
47
+
48
+ ```bash
49
+ git remote -v
50
+ gh repo view --json nameWithOwner,defaultBranchRef
51
+ ```
52
+
53
+ Use `--repo OWNER/REPO` when running outside a checkout or targeting another repository.
54
+
55
+ ## Core Workflows
56
+
57
+ ### Pull Requests
58
+
59
+ ```bash
60
+ # List and inspect PRs
61
+ gh pr list --state open
62
+ gh pr view 123 --comments
63
+
64
+ # Create a PR after pushing the branch
65
+ git push -u origin HEAD
66
+ gh pr create --base main --title "Add feature" --body "Summary and testing notes"
67
+
68
+ # Review a PR
69
+ gh pr checkout 123
70
+ gh pr diff 123
71
+ gh pr review 123 --approve
72
+
73
+ # Merge only after the user has explicitly approved the merge
74
+ gh pr merge 123 --squash --delete-branch
75
+ ```
76
+
77
+ Prefer `--body-file` for substantial descriptions and `--json` with `--jq` for reliable scripting. Before creating or updating a PR, inspect repository templates and existing branch commits when the workflow requires them.
78
+
79
+ ### Issues
80
+
81
+ ```bash
82
+ gh issue list --state open --assignee @me
83
+ gh issue view 123 --comments
84
+ gh issue create --title "Bug report" --body-file bug.md --label bug
85
+ gh issue comment 123 --body "Investigation is complete."
86
+ ```
87
+
88
+ Use `--repo OWNER/REPO` for issues in another repository. Treat closing, reopening, editing, and deleting issues as mutating operations that require clear user intent.
89
+
90
+ ### GitHub Actions
91
+
92
+ ```bash
93
+ gh run list --limit 20
94
+ gh run view RUN_ID
95
+ gh run view RUN_ID --log-failed
96
+ gh run watch RUN_ID
97
+ gh workflow run workflow.yml --ref main
98
+ ```
99
+
100
+ Confirm the workflow name, ref, and inputs before dispatching a workflow. Do not rerun or cancel runs without user authorization.
101
+
102
+ ### Releases and Repositories
103
+
104
+ ```bash
105
+ gh release list
106
+ gh release view v1.2.3
107
+ gh release create v1.2.3 --generate-notes
108
+ gh repo view OWNER/REPO
109
+ gh repo clone OWNER/REPO
110
+ ```
111
+
112
+ Creating, editing, or deleting releases and repositories is destructive or externally visible; confirm the target and requested changes first.
113
+
114
+ ## API and Scripting
115
+
116
+ Use structured output rather than parsing human-readable tables:
117
+
118
+ ```bash
119
+ gh pr list --json number,title,state --jq '.[] | [.number, .title, .state] | @tsv'
120
+ gh api repos/OWNER/REPO/issues --paginate --jq '.[] | [.number, .title] | @tsv'
121
+ ```
122
+
123
+ For API mutations, state the HTTP method and target before execution and ask for confirmation when the operation changes remote data:
124
+
125
+ ```bash
126
+ gh api repos/OWNER/REPO/issues --method POST \
127
+ -f title='Bug report' -f body='Details'
128
+ ```
129
+
130
+ Use `gh <command> --help` and `gh api --help` when exact flags or endpoint behavior is uncertain. Prefer `--paginate` for collection endpoints and constrain fields with `--jq` to avoid exposing unnecessary data.
131
+
132
+ ## Best Practices
133
+
134
+ 1. Run `gh auth status` before diagnosing authentication failures.
135
+ 2. Check `git status`, the current branch, and the remote before PR or release work.
136
+ 3. Use `--repo OWNER/REPO` rather than changing directories solely to select a repository.
137
+ 4. Use `--json`/`--jq` for scripts and `--body-file` for multiline content.
138
+ 5. Confirm before pushing, merging, closing, deleting, dispatching, rerunning, or cancelling remote work.
139
+ 6. Do not bypass branch protection or approval requirements unless the user explicitly requests it and has authority.
140
+
141
+ ## Common Problems
142
+
143
+ - **`gh: command not found`** — Install GitHub CLI and verify it is on `PATH`.
144
+ - **Authentication or scope errors** — Run `gh auth status`, then `gh auth refresh` or `gh auth login` as appropriate.
145
+ - **Wrong repository** — Check `git remote -v` and pass `--repo OWNER/REPO` explicitly.
146
+ - **PR cannot merge** — Inspect `gh pr checks NUMBER`, mergeability, required reviews, and branch protection.
147
+ - **Workflow dispatch fails** — Confirm the workflow supports `workflow_dispatch`, the ref exists, and required inputs are supplied.
148
+ - **API returns 404** — Verify repository spelling and that the authenticated account can access it.
149
+
150
+ ## Quick Reference
151
+
152
+ - `gh repo view` — View the current repository
153
+ - `gh pr list` / `gh pr view NUMBER` / `gh pr create` — Pull request workflows
154
+ - `gh issue list` / `gh issue view NUMBER` / `gh issue create` — Issue workflows
155
+ - `gh run list` / `gh run view ID` / `gh run watch ID` — Actions workflows
156
+ - `gh release list` / `gh release create TAG` — Release workflows
157
+ - `gh api ENDPOINT` — GitHub REST or GraphQL API access
@@ -0,0 +1,10 @@
1
+ # Examples
2
+
3
+ - Check `gh auth status` and repository context before performing GitHub operations.
4
+ - List open pull requests, inspect a specific PR with comments and checks, and summarize its status without changing remote data.
5
+ - Prepare a pull request from the current branch by reviewing commits and templates, then show the proposed title and body before creating it.
6
+ - Search issues with structured `--json` and `--jq` output, avoiding fragile parsing of terminal tables.
7
+ - Inspect a failed GitHub Actions run with `gh run view RUN_ID --log-failed` and summarize the relevant failure.
8
+ - Create or dispatch a workflow only after confirming the workflow, ref, and inputs with the user.
9
+ - Use `gh api` for an endpoint not covered by a subcommand, preferring read-only requests and requesting confirmation before mutations.
10
+ - Ask for explicit confirmation before pushing, merging, closing, deleting, rerunning, cancelling, or publishing remote resources.