@reddb-io/red-skills-dev 2.75.2

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 (135) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +30 -0
  3. package/package.json +32 -0
  4. package/skills/engineering/README.md +36 -0
  5. package/skills/engineering/_report-runtime/WRAPPER.md +47 -0
  6. package/skills/engineering/afk/AGENT-PROMPT.md +295 -0
  7. package/skills/engineering/afk/SAFETY.md +103 -0
  8. package/skills/engineering/afk/SKILL.md +160 -0
  9. package/skills/engineering/afk/TROUBLESHOOTING.md +260 -0
  10. package/skills/engineering/afk/actions-lane.md +213 -0
  11. package/skills/engineering/afk/bin/README.md +29 -0
  12. package/skills/engineering/afk/bin/afk.mjs +51 -0
  13. package/skills/engineering/afk/defaults/cargo-pre-worktree.sh +37 -0
  14. package/skills/engineering/afk/defaults/envelope-post-attempt.sh +47 -0
  15. package/skills/engineering/afk/defaults/gradle-pre-worktree.sh +42 -0
  16. package/skills/engineering/afk/defaults/heartbeat-post-attempt.sh +43 -0
  17. package/skills/engineering/afk/defaults/validation-post-merge.sh +77 -0
  18. package/skills/engineering/afk/detectors/README.md +72 -0
  19. package/skills/engineering/afk/detectors/cargo.sh +27 -0
  20. package/skills/engineering/afk/detectors/gradle.sh +35 -0
  21. package/skills/engineering/afk/docs/BOOT-SWEEPS.md +81 -0
  22. package/skills/engineering/afk/docs/CONFIG.md +238 -0
  23. package/skills/engineering/afk/docs/ENVELOPE.md +177 -0
  24. package/skills/engineering/afk/docs/HANDOFF.md +70 -0
  25. package/skills/engineering/afk/docs/LIVENESS.md +56 -0
  26. package/skills/engineering/afk/docs/OPERATIONS.md +409 -0
  27. package/skills/engineering/afk/examples/only-mine.sh +32 -0
  28. package/skills/engineering/afk/examples/red-afk-attempt-action.yml +53 -0
  29. package/skills/engineering/afk/examples/rs-afk-attempt.yml +76 -0
  30. package/skills/engineering/afk/fleet.md +127 -0
  31. package/skills/engineering/afk/hooks/red-cargo +44 -0
  32. package/skills/engineering/afk/hooks/red-envelope +50 -0
  33. package/skills/engineering/afk/hooks/red-gradle +50 -0
  34. package/skills/engineering/afk/hooks/red-heartbeat +46 -0
  35. package/skills/engineering/afk/hooks/red-validation +79 -0
  36. package/skills/engineering/afk/monitor.md +170 -0
  37. package/skills/engineering/afk/runner-claude-minimax.md +71 -0
  38. package/skills/engineering/afk/runner-claude.md +67 -0
  39. package/skills/engineering/afk/runner-codex.md +138 -0
  40. package/skills/engineering/afk/runner-hermes.md +40 -0
  41. package/skills/engineering/afk/runner-opencode.md +142 -0
  42. package/skills/engineering/ask-red/SKILL.md +137 -0
  43. package/skills/engineering/audit-skills/SKILL.md +46 -0
  44. package/skills/engineering/code-review/SKILL.md +106 -0
  45. package/skills/engineering/context/SKILL.md +142 -0
  46. package/skills/engineering/curate/SKILL.md +133 -0
  47. package/skills/engineering/daily-review/SKILL.md +68 -0
  48. package/skills/engineering/dashboard/SKILL.md +44 -0
  49. package/skills/engineering/diagnose/SKILL.md +155 -0
  50. package/skills/engineering/diagnose/scripts/hitl-loop.template.sh +41 -0
  51. package/skills/engineering/go/SKILL.md +144 -0
  52. package/skills/engineering/go/TROUBLESHOOTING.md +81 -0
  53. package/skills/engineering/ground-truth/SKILL.md +84 -0
  54. package/skills/engineering/hitl/SKILL.md +171 -0
  55. package/skills/engineering/hitl/TROUBLESHOOTING.md +76 -0
  56. package/skills/engineering/implement/SKILL.md +69 -0
  57. package/skills/engineering/improve-codebase-architecture/DEEPENING.md +37 -0
  58. package/skills/engineering/improve-codebase-architecture/INTERFACE-DESIGN.md +44 -0
  59. package/skills/engineering/improve-codebase-architecture/LANGUAGE.md +53 -0
  60. package/skills/engineering/improve-codebase-architecture/SKILL.md +81 -0
  61. package/skills/engineering/model-tier-policy/SKILL.md +83 -0
  62. package/skills/engineering/prototype/LOGIC.md +79 -0
  63. package/skills/engineering/prototype/SKILL.md +30 -0
  64. package/skills/engineering/prototype/UI.md +112 -0
  65. package/skills/engineering/red-doctor/APPLY.md +35 -0
  66. package/skills/engineering/red-doctor/SKILL.md +172 -0
  67. package/skills/engineering/red-gains/SKILL.md +49 -0
  68. package/skills/engineering/red-setup/INTERVIEW.md +266 -0
  69. package/skills/engineering/red-setup/ISSUE-SWEEP.md +18 -0
  70. package/skills/engineering/red-setup/REFERENCE.md +35 -0
  71. package/skills/engineering/red-setup/SKILL.md +58 -0
  72. package/skills/engineering/red-setup/WORKFLOWS.md +74 -0
  73. package/skills/engineering/red-setup/WRITE-CONTRACT.md +151 -0
  74. package/skills/engineering/red-setup/config-template.yaml +174 -0
  75. package/skills/engineering/red-setup/domain.md +52 -0
  76. package/skills/engineering/red-setup/issue-tracker-github.md +88 -0
  77. package/skills/engineering/red-setup/rsp-retirement-runbook.md +35 -0
  78. package/skills/engineering/red-setup/scripts/install-runtime-shim.sh +189 -0
  79. package/skills/engineering/red-setup/triage-labels.md +176 -0
  80. package/skills/engineering/red-setup/workflows/red-issues-needs-triage.yml +36 -0
  81. package/skills/engineering/red-statusline/HOST-NOTES.md +180 -0
  82. package/skills/engineering/red-statusline/SKILL.md +58 -0
  83. package/skills/engineering/report-bug/SKILL.md +155 -0
  84. package/skills/engineering/resolving-merge-conflicts/SKILL.md +143 -0
  85. package/skills/engineering/retake/SKILL.md +184 -0
  86. package/skills/engineering/review-adrs/SKILL.md +125 -0
  87. package/skills/engineering/start/ADR-FORMAT.md +47 -0
  88. package/skills/engineering/start/CONTEXT-FORMAT.md +77 -0
  89. package/skills/engineering/start/DOC-LANDING-FINALIZER.md +9 -0
  90. package/skills/engineering/start/SKILL.md +179 -0
  91. package/skills/engineering/tdd/SKILL.md +96 -0
  92. package/skills/engineering/tdd/deep-modules.md +33 -0
  93. package/skills/engineering/tdd/interface-design.md +31 -0
  94. package/skills/engineering/tdd/mocking.md +59 -0
  95. package/skills/engineering/tdd/tests.md +85 -0
  96. package/skills/engineering/to-spec/SKILL.md +104 -0
  97. package/skills/engineering/to-tickets/SKILL.md +158 -0
  98. package/skills/engineering/triage/AGENT-BRIEF.md +207 -0
  99. package/skills/engineering/triage/OUT-OF-SCOPE.md +101 -0
  100. package/skills/engineering/triage/SKILL.md +176 -0
  101. package/skills/engineering/verify/SKILL.md +136 -0
  102. package/skills/engineering/wayfinder/SKILL.md +128 -0
  103. package/skills/engineering/zoom-out/SKILL.md +51 -0
  104. package/skills/engineering/zoom-out/scripts/graph-mode-plumbing.sh +36 -0
  105. package/skills/engineering/zoom-out/scripts/tests/contract.test.sh +168 -0
  106. package/skills/knowledge/README.md +5 -0
  107. package/skills/knowledge/research/SKILL.md +76 -0
  108. package/skills/misc/README.md +8 -0
  109. package/skills/misc/branch-lock/SKILL.md +187 -0
  110. package/skills/misc/branch-lock/scripts/branch-lock-hook.sh +113 -0
  111. package/skills/misc/branch-lock/scripts/branch-lock-session-start.sh +81 -0
  112. package/skills/misc/branch-lock/scripts/branch-lock.sh +68 -0
  113. package/skills/misc/branch-lock/scripts/lib/dev-config.sh +126 -0
  114. package/skills/misc/branch-lock/scripts/lib/git-command-classifier.sh +198 -0
  115. package/skills/misc/branch-lock/scripts/lib/lock-store.sh +67 -0
  116. package/skills/misc/branch-lock/scripts/lib/scope-resolver.sh +43 -0
  117. package/skills/misc/branch-lock/scripts/tests/branch-lock-cli.test.sh +114 -0
  118. package/skills/misc/branch-lock/scripts/tests/claude-plugin-hook.test.sh +117 -0
  119. package/skills/misc/branch-lock/scripts/tests/codex-hook.test.sh +229 -0
  120. package/skills/misc/branch-lock/scripts/tests/dev-config.test.sh +99 -0
  121. package/skills/misc/branch-lock/scripts/tests/git-command-classifier.test.sh +187 -0
  122. package/skills/misc/branch-lock/scripts/tests/lock-store.test.sh +90 -0
  123. package/skills/misc/branch-lock/scripts/tests/scope-resolver.test.sh +63 -0
  124. package/skills/misc/branch-lock/scripts/tests/session-start.test.sh +123 -0
  125. package/skills/misc/git-guardrails-claude-code/SKILL.md +105 -0
  126. package/skills/misc/git-guardrails-claude-code/scripts/block-dangerous-git.sh +231 -0
  127. package/skills/misc/git-guardrails-claude-code/scripts/tests/block-dangerous-git.test.sh +143 -0
  128. package/skills/misc/migrate-to-shoehorn/SKILL.md +96 -0
  129. package/skills/misc/setup-pre-commit/SKILL.md +94 -0
  130. package/skills/productivity/README.md +8 -0
  131. package/skills/productivity/ff/SKILL.md +116 -0
  132. package/skills/productivity/handoff/SKILL.md +37 -0
  133. package/skills/productivity/reflect/SKILL.md +18 -0
  134. package/skills/productivity/write-a-skill/SKILL.md +190 -0
  135. package/skills/productivity/write-a-skill/WRITING-STYLE.md +62 -0
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: migrate-to-shoehorn
3
+ description: Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.
4
+ ---
5
+
6
+ # Migrate to Shoehorn
7
+
8
+ **Replace `as` assertions in test files with `fromPartial()` or `fromAny()` from `@total-typescript/shoehorn`.**
9
+
10
+ ## Why shoehorn?
11
+
12
+ `shoehorn` lets you pass partial data in tests while keeping TypeScript happy. It replaces `as` assertions with `fromPartial()` for partial data and `fromAny()` for intentionally wrong types.
13
+
14
+ **Test code only.** Never use shoehorn in production code.
15
+
16
+ Problems with `as` in tests:
17
+
18
+ - Trained not to use it
19
+ - Must manually specify target type
20
+ - Double-as (`as unknown as Type`) for intentionally wrong data
21
+
22
+ ## Install
23
+
24
+ ```bash
25
+ npm i @total-typescript/shoehorn
26
+ ```
27
+
28
+ ## Migration patterns
29
+
30
+ ### `as Type` (and large objects with few needed properties) → `fromPartial()`
31
+
32
+ Whether you wrote `as Request` or hand-faked every property of a large type, only the properties the test cares about matter. `fromPartial()` keeps those and lets TypeScript accept the rest.
33
+
34
+ Before:
35
+
36
+ ```ts
37
+ type Request = {
38
+ body: { id: string };
39
+ headers: Record<string, string>;
40
+ cookies: Record<string, string>;
41
+ // ...20 more properties
42
+ };
43
+
44
+ it("gets user by id", () => {
45
+ // Faking the entire Request, or papering over it with `as`
46
+ getUser({ body: { id: "123" } } as Request);
47
+ });
48
+ ```
49
+
50
+ After:
51
+
52
+ ```ts
53
+ import { fromPartial } from "@total-typescript/shoehorn";
54
+
55
+ it("gets user by id", () => {
56
+ getUser(fromPartial({ body: { id: "123" } }));
57
+ });
58
+ ```
59
+
60
+ ### `as unknown as Type` → `fromAny()`
61
+
62
+ Before:
63
+
64
+ ```ts
65
+ getUser({ body: { id: 123 } } as unknown as Request); // wrong type on purpose
66
+ ```
67
+
68
+ After:
69
+
70
+ ```ts
71
+ import { fromAny } from "@total-typescript/shoehorn";
72
+
73
+ getUser(fromAny({ body: { id: 123 } }));
74
+ ```
75
+
76
+ ## When to use each
77
+
78
+ | Function | Use case |
79
+ | --------------- | -------------------------------------------------- |
80
+ | `fromPartial()` | Pass partial data that still type-checks |
81
+ | `fromAny()` | Pass intentionally wrong data (keeps autocomplete) |
82
+
83
+ ## Workflow
84
+
85
+ 1. **Gather requirements** - ask user:
86
+ - What test files have `as` assertions causing problems?
87
+ - Are they dealing with large objects where only some properties matter?
88
+ - Do they need to pass intentionally wrong data for error testing?
89
+
90
+ 2. **Install and migrate**:
91
+ - [ ] Install: `npm i @total-typescript/shoehorn`
92
+ - [ ] Find test files with `as` assertions: `grep -r " as [A-Z]" --include="*.test.ts" --include="*.spec.ts"`
93
+ - [ ] Replace `as Type` with `fromPartial()`
94
+ - [ ] Replace `as unknown as Type` with `fromAny()`
95
+ - [ ] Add imports from `@total-typescript/shoehorn`
96
+ - [ ] Run type check to verify
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: setup-pre-commit
3
+ description: Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Setup Pre-Commit Hooks
8
+
9
+ **Enforce lint + tests before commit.**
10
+
11
+ ## What This Sets Up
12
+
13
+ - **Husky** pre-commit hook
14
+ - **lint-staged** running Prettier on all staged files
15
+ - **Prettier** config (if missing)
16
+ - **typecheck** and **test** scripts in the pre-commit hook
17
+
18
+ ## Steps
19
+
20
+ ### 1. Detect package manager
21
+
22
+ Check for `package-lock.json` (npm), `pnpm-lock.yaml` (pnpm), `yarn.lock` (yarn), `bun.lockb` (bun). Use whichever is present. Default to npm if unclear.
23
+
24
+ ### 2. Install dependencies
25
+
26
+ Install as devDependencies:
27
+
28
+ ```
29
+ husky lint-staged prettier
30
+ ```
31
+
32
+ ### 3. Initialize Husky
33
+
34
+ ```bash
35
+ npx husky init
36
+ ```
37
+
38
+ This creates `.husky/` dir and adds `prepare: "husky"` to package.json.
39
+
40
+ ### 4. Create `.husky/pre-commit`
41
+
42
+ Write this file (no shebang needed for Husky v9+):
43
+
44
+ ```
45
+ npx lint-staged
46
+ npm run typecheck
47
+ npm run test
48
+ ```
49
+
50
+ **Adapt**: Replace `npm` with detected package manager. If repo has no `typecheck` or `test` script in package.json, omit those lines and tell the user.
51
+
52
+ ### 5. Create `.lintstagedrc`
53
+
54
+ ```json
55
+ {
56
+ "*": "prettier --ignore-unknown --write"
57
+ }
58
+ ```
59
+
60
+ ### 6. Create `.prettierrc` (if missing)
61
+
62
+ Only create if no Prettier config exists. Use these defaults:
63
+
64
+ ```json
65
+ {
66
+ "useTabs": false,
67
+ "tabWidth": 2,
68
+ "printWidth": 80,
69
+ "singleQuote": false,
70
+ "trailingComma": "es5",
71
+ "semi": true,
72
+ "arrowParens": "always"
73
+ }
74
+ ```
75
+
76
+ ### 7. Verify
77
+
78
+ - [ ] `.husky/pre-commit` exists and is executable
79
+ - [ ] `.lintstagedrc` exists
80
+ - [ ] `prepare` script in package.json is `"husky"`
81
+ - [ ] `prettier` config exists
82
+ - [ ] Run `npx lint-staged` to verify it works
83
+
84
+ ### 8. Commit
85
+
86
+ Stage all changed/created files and commit with message: `Add pre-commit hooks (husky + lint-staged + prettier)`
87
+
88
+ This will run through the new pre-commit hooks — a good smoke test that everything works.
89
+
90
+ ## Notes
91
+
92
+ - Husky v9+ doesn't need shebangs in hook files
93
+ - `prettier --ignore-unknown` skips files Prettier can't parse (images, etc.)
94
+ - The pre-commit runs lint-staged first (fast, staged-only), then full typecheck and tests
@@ -0,0 +1,8 @@
1
+ # Productivity
2
+
3
+ General workflow tools, not code-specific.
4
+
5
+ - **[reflect](./reflect/SKILL.md)** — Get relentlessly interviewed about a plan or design until every branch of the decision tree is resolved.
6
+ - **[ff](./ff/SKILL.md)** — Fast-forward clarity: pick a framing, get your message rewritten into it, then choose whether to dispatch (execute) it.
7
+ - **[handoff](./handoff/SKILL.md)** — Compact the current conversation into a handoff document so another agent can continue the work.
8
+ - **[write-a-skill](./write-a-skill/SKILL.md)** — Create new skills with proper structure, progressive disclosure, and bundled resources.
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: ff
3
+ description: Reframes the user's message into one chosen framing through a two-step interaction — first asks which framing to rewrite into, then generates that single rewrite and asks whether to dispatch (execute) it. Use when the user invokes `/ff`, says fast-forward, asks to rewrite their own message, or wants to clarify intent before acting.
4
+ argument-hint: "[--dispatch|-d] [text to reframe]"
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # /ff
9
+
10
+ Fast-forward clarity. Reframe the user's latest message, or the text passed after
11
+ `/ff`, into **one** chosen framing — through two sequential questions, asked one
12
+ at a time with the user's interaction between them.
13
+
14
+ `/ff` does NOT dump every framing at once. It asks which framing the user wants
15
+ first, generates only that one rewrite, then asks whether to dispatch it.
16
+
17
+ <what-to-do>
18
+
19
+ **Reframe the user's message through exactly one chosen framing, via two sequential interactions — pick the framing first, generate the rewrite second.** Never skip ahead or produce multiple rewrites.
20
+
21
+ Run these two steps in order. Ask one question, wait for the answer, then proceed to the next.
22
+
23
+ ### Step 1 — choose the framing (no rewrite yet — stop and wait for the user's pick)
24
+
25
+ Present the framing menu with a single recommendation, then **stop and wait**. Do
26
+ not generate any rewrite yet — the user picks by label, before seeing any output.
27
+
28
+ ```md
29
+ How do you want to rewrite your content?
30
+
31
+ I think you want (x), because ...
32
+
33
+ (a) For a junior dev
34
+ (b) For a 10-year-old
35
+ (c) For a senior dev
36
+ (d) As an improved prompt
37
+ (e) As an implementable issue
38
+ (f) As a decision request
39
+ (g) Short and direct
40
+ ```
41
+
42
+ The user picks with phrases like `d`, `use a`, or `go with that one`.
43
+
44
+ ### Step 2 — generate the chosen rewrite, then ask to dispatch (only after the user picks from Step 1)
45
+
46
+ Produce **only** the chosen framing's rewrite and present it, then ask whether to
47
+ dispatch:
48
+
49
+ ```md
50
+ Result:
51
+ {result}
52
+
53
+ Would you like to dispatch it? Yes/no
54
+ ```
55
+
56
+ - **Yes** → adopt `{result}` as the active message and **carry out the underlying
57
+ task** immediately.
58
+ - **No** → hand `{result}` back and **stop**. Do not execute anything.
59
+
60
+ **`--dispatch`/`-d` shortcut**: if the flag was passed in the invocation, **skip
61
+ the Yes/no question** — present the `Result:` and immediately dispatch (auto-yes).
62
+ The flag may appear anywhere in the arguments; strip it before reframing the
63
+ remaining text.
64
+
65
+ ### Hard rules
66
+
67
+ - ✅ Generate exactly **one** rewrite — the chosen framing. Never preview all of them.
68
+ - ✅ In Step 1, reframe only: do not solve the task, edit files, run commands, or
69
+ continue a paused `/start`, `/diagnose`, `/afk`, or implementation task.
70
+ - ✅ Keep the rewrite tight: a few lines, or a compact summary when the source is long.
71
+ - ❌ Do not execute anything until the user answers Yes in Step 2 (or passed `-d`).
72
+ - ❌ Do not collapse the two steps into one turn — the menu and the result are
73
+ separate questions.
74
+
75
+ </what-to-do>
76
+
77
+ <supporting-info>
78
+
79
+ ## Worked example — framing (e) end-to-end
80
+
81
+ User invokes `/ff implement error handling for this API`.
82
+
83
+ **Step 1 output (stop — wait for the user's pick):** print the Step 1 framing
84
+ menu (see `<what-to-do>`), recommending `(e)` — "because it's an implementation
85
+ task that could be scoped as a ticket."
86
+
87
+ User replies: `e`
88
+
89
+ **Step 2 output (generate + ask to dispatch):**
90
+
91
+ ```
92
+ Result:
93
+ **Add error handling to the payment API endpoint**
94
+ Context: The `/api/payment` endpoint currently lets uncaught exceptions propagate to the caller.
95
+ Scope: Wrap the handler in try/catch; return `{ error: "…", code: 500 }` on failure; log via the existing logger.
96
+ Acceptance criteria: non-2xx responses are structured JSON; errors are logged; no uncaught exceptions escape.
97
+ Validation: manual smoke test + existing integration tests pass.
98
+
99
+ Would you like to dispatch it? Yes/no
100
+ ```
101
+
102
+ User replies: `yes` → carry out the implementation task described above.
103
+
104
+ ---
105
+
106
+ ## Framing semantics
107
+
108
+ - **(a) For a junior dev**: precise but simple technical language, minimal jargon, practical examples.
109
+ - **(b) For a 10-year-old**: plain language, one analogy if useful, no patronizing tone.
110
+ - **(c) For a senior dev**: dense technical vocabulary, explicit assumptions, constraints, edge cases, and tradeoffs.
111
+ - **(d) As an improved prompt**: prompt-engineered request with role/context, objective, constraints, desired output, and success criteria.
112
+ - **(e) As an implementable issue**: title, context, scope, acceptance criteria, and validation.
113
+ - **(f) As a decision request**: decision needed, options, tradeoffs, recommendation, and what answer unblocks.
114
+ - **(g) Short and direct**: the shortest clear version.
115
+
116
+ </supporting-info>
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: handoff
3
+ description: Compact the current conversation into a handoff document for another agent to pick up.
4
+ argument-hint: "What will the next session be used for?"
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ **Hand over context, not content — reference existing artifacts; do not reproduce them.** The next agent needs enough to continue, not a transcript.
9
+
10
+ Write a handoff document to a path from `mktemp -t handoff-XXXXXX.md` (read the file before writing). Cover:
11
+
12
+ - **State:** what was done, what is in progress, what is blocked
13
+ - **Next action:** the first concrete step the next session should take
14
+ - **Skills:** which skills the next session should invoke, if any
15
+ - **Refs:** paths or URLs to any Specs, plans, ADRs, issues, commits, or diffs — do not reproduce their content
16
+
17
+ Use this template:
18
+
19
+ ```markdown
20
+ # Handoff — <date>
21
+
22
+ ## State
23
+ <what was done / in progress / blocked>
24
+
25
+ ## Next action
26
+ <the first concrete step>
27
+
28
+ ## Skills to invoke
29
+ <list of /skill names, if any>
30
+
31
+ ## References
32
+ - <path-or-url>: <one-line description>
33
+ ```
34
+
35
+ Redact API keys, passwords, tokens, and personally identifiable information before writing.
36
+
37
+ If the user passed arguments, treat them as a description of what the next session will focus on and tailor the doc accordingly.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: reflect
3
+ description: Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, reflect on a design, or mentions "reflect".
4
+ ---
5
+
6
+ <what-to-do>
7
+
8
+ **Interview the user — one question per turn, one recommendation per question — until every branch of this plan is understood.** Do not stack questions; do not skip ahead.
9
+
10
+ Walk down each branch of the decision tree, resolving dependencies between decisions one-by-one. For each question, include your recommended answer with a one-sentence reason.
11
+
12
+ Ask the questions one at a time. Wait for the user's reply before proceeding.
13
+
14
+ If a question can be answered by exploring the codebase, explore the codebase instead of asking.
15
+
16
+ When the reflection session ends, run the shared end-of-session doc-landing finalizer in [`/start`'s DOC-LANDING-FINALIZER.md](../../engineering/start/DOC-LANDING-FINALIZER.md) before exiting.
17
+
18
+ </what-to-do>
@@ -0,0 +1,190 @@
1
+ ---
2
+ name: write-a-skill
3
+ description: Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
4
+ ---
5
+
6
+ # Writing Skills
7
+
8
+ <what-to-do>
9
+
10
+ ## Process
11
+
12
+ 1. **Gather requirements** — ask the user, before drafting anything:
13
+ - What task or domain does the skill cover?
14
+ - Which specific use cases must it handle?
15
+ - Does it need executable scripts, or just instructions?
16
+ - Any reference material to bundle?
17
+
18
+ 2. **Draft the skill** — produce:
19
+ - A SKILL.md with concise, imperative instructions.
20
+ - Extra reference files only when content would push SKILL.md past ~100 lines.
21
+ - Utility scripts only when a deterministic operation repeats.
22
+
23
+ 3. **Review with the user** — present the draft and ask whether it covers the
24
+ use cases, what is missing or unclear, and which section needs more or less
25
+ detail. Do not ship before this loop closes.
26
+
27
+ </what-to-do>
28
+
29
+ <supporting-info>
30
+
31
+ ## Skill structure
32
+
33
+ ```
34
+ skill-name/
35
+ ├── SKILL.md # Main instructions (required)
36
+ ├── REFERENCE.md # Detailed docs (only if needed)
37
+ ├── EXAMPLES.md # Usage examples (only if needed)
38
+ └── scripts/ # Utility scripts (only if needed)
39
+ └── helper.js
40
+ ```
41
+
42
+ ## SKILL.md template
43
+
44
+ ```md
45
+ ---
46
+ name: skill-name
47
+ description: Brief description of capability. Use when [specific triggers].
48
+ ---
49
+
50
+ # Skill Name
51
+
52
+ <what-to-do>
53
+
54
+ [The primary directive — imperative, non-negotiable steps the agent
55
+ executes literally. DOs / DON'Ts here are hard constraints.]
56
+
57
+ </what-to-do>
58
+
59
+ <supporting-info>
60
+
61
+ [Reference material consulted on demand — formats, file layouts, trigger
62
+ conditions, examples. Link one level deep: see [REFERENCE.md](REFERENCE.md).]
63
+
64
+ </supporting-info>
65
+ ```
66
+
67
+ ## Description requirements
68
+
69
+ The description is **the only thing the agent sees before loading the skill** —
70
+ write it for the picker, not the reader. It is surfaced in the system prompt
71
+ beside every other installed skill, and the agent chooses from those lines
72
+ alone.
73
+
74
+ Give the agent just enough to know two things: what the capability is, and
75
+ when to trigger it (keywords, contexts, file types).
76
+
77
+ **Format**:
78
+
79
+ - Max 1024 chars.
80
+ - Third person.
81
+ - First sentence: what it does.
82
+ - Second sentence: starts with the literal `"Use when"` so the trigger is
83
+ matchable verbatim.
84
+
85
+ **Good** — distinguishes itself from every other document skill:
86
+
87
+ ```
88
+ Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when user mentions PDFs, forms, or document extraction.
89
+ ```
90
+
91
+ **Bad** — gives the agent no way to pick it:
92
+
93
+ ```
94
+ Helps with documents.
95
+ ```
96
+
97
+ ## Trigger decision (user-invoked vs model-invoked)
98
+
99
+ Decide **before writing the description**: should the model reach for this skill
100
+ on its own, or only the operator by typing `/skill-name`? Set
101
+ `disable-model-invocation: true` in the frontmatter to make a skill **user-only**
102
+ — the model can no longer trigger it; it runs solely on the explicit command.
103
+
104
+ The trade-off is where the load lands. A **model-invocable** skill's description
105
+ is loaded into every session's context — a standing **context load on the agent**,
106
+ paid on every turn whether or not the skill fires. A **user-only** skill imposes
107
+ **cognitive load on the operator** instead — they must remember the command
108
+ exists — but costs the agent zero standing context.
109
+
110
+ **Default rule: deliberate operational commands ship user-only.** Setup wizards,
111
+ reports, and dispatch/maintenance verbs are things the operator decides to run —
112
+ `disable-model-invocation: true`. Skills the model should proactively reach for
113
+ stay model-invocable, and then **the description must earn its context cost** —
114
+ every session pays for it, so it has to distinguish itself from every other line.
115
+
116
+ User-only also removes a **class of problem**: model invocation is unpredictable.
117
+ Even a well-scoped description may not fire when it fits — the model can skip a
118
+ context pointer it should have followed. A `/command` the operator types can't be
119
+ missed that way, so deliberate commands become reliable by construction.
120
+
121
+ ## When to add scripts
122
+
123
+ Add a utility script when the operation is deterministic (validation,
124
+ formatting), when the same code would be generated repeatedly, or when errors
125
+ need explicit handling. Scripts save tokens and beat generated code on
126
+ reliability.
127
+
128
+ ## When to split files
129
+
130
+ Split into a separate file when SKILL.md exceeds ~100 lines, when content spans
131
+ distinct domains (finance vs sales schemas), or when advanced features are
132
+ rarely needed — keep references one level deep so the agent never chases a chain.
133
+
134
+ **Branch-gated external references** — reference material consumed by only one
135
+ branch (mode / flag / subcommand) of the skill moves to a sibling file behind a
136
+ one-line context pointer: `if X, read Y`. The unused branch then costs the agent
137
+ nothing until it fires. In-repo exemplars: `afk`'s Actions-lane reference
138
+ (`actions-lane.md`, read only on the GitHub-Actions branch), `tdd`'s bundled
139
+ reference files (`mocking.md`, `refactoring.md`, …, each pulled in only when that
140
+ sub-topic comes up), and `prototype`'s two branch files (`LOGIC.md` vs `UI.md`,
141
+ one per route the skill takes).
142
+
143
+ ## Leg-work splitting (hide the goal to protect the gather phase)
144
+
145
+ When an early gather/interview phase keeps getting **rushed because the final
146
+ artifact goal is visible in the same skill**, split the phase into its own skill
147
+ so the future step is hidden. With the payoff out of sight, the agent can't skip
148
+ ahead to it — the gather phase runs to completion on its own terms.
149
+
150
+ In-repo exemplars: `/start` (grill and sharpen the plan) hands off to `/to-spec`
151
+ (publish the Spec) instead of doing both, so the grilling isn't cut short by the
152
+ pull toward shipping; and `writing-fragments` is separate from `writing-shape` /
153
+ `writing-beats` so the raw-material gather isn't rushed toward the finished piece.
154
+
155
+ ## TROUBLESHOOTING references
156
+
157
+ Operational TROUBLESHOOTING references use one fixed playbook entry format:
158
+ Symptom -> Confirm -> Recover -> Root fix. Define that convention here, and have
159
+ each reference link back to `write-a-skill` instead of re-explaining the format.
160
+
161
+ Docs-contract tests for TROUBLESHOOTING references assert file existence, the SKILL.md link, and stable load-bearing headings. They do not assert prose wording;
162
+ pinning prose turns a documentation contract into a stale-doc test.
163
+
164
+ ## SKILL.md writing style
165
+
166
+ Section structure (`<what-to-do>` / `<supporting-info>`) decides *where* a
167
+ sentence goes. Sentence-level style and Steering failure modes live in
168
+ [WRITING-STYLE.md](WRITING-STYLE.md); read it before drafting or reviewing any
169
+ RedSkills SKILL.md.
170
+
171
+ ## Review checklist (run after the draft compiles)
172
+
173
+ - [ ] Description ends with the literal `"Use when …"` trigger.
174
+ - [ ] SKILL.md stays under ~100 lines (excluding this meta-skill).
175
+ - [ ] No time-sensitive info.
176
+ - [ ] One term per concept — no synonym drift.
177
+ - [ ] Concrete before → after or input → output examples included.
178
+ - [ ] References stay one level deep.
179
+ - [ ] Steps read imperative and bold-led — the skill follows its own style.
180
+ - [ ] **Deletion test** — for each paragraph, ask "would the agent behave
181
+ differently if this were deleted?" Delete the no-ops.
182
+ - [ ] **Trigger decision recorded** — the skill is explicitly user-only
183
+ (`disable-model-invocation: true`) or model-invocable with a description that
184
+ earns its context cost.
185
+ - [ ] **Negation check** — each prohibition has a paired positive alternative on
186
+ the same line; rewrite standalone "don't X" entries as "do Y instead".
187
+ - [ ] **Negative-space audit** — each silence is a deliberate open branch, not an
188
+ oversight; fill gaps or name them explicitly.
189
+
190
+ </supporting-info>
@@ -0,0 +1,62 @@
1
+ # SKILL.md Writing Style
2
+
3
+ Section structure (`<what-to-do>` / `<supporting-info>`) decides *where* a
4
+ sentence goes; this section decides *how the sentence reads*. Apply these nine
5
+ sentence-level techniques — borrowed from `anthropics/launch-your-agent` — when
6
+ writing any RedSkills SKILL.md. Each carries a one-line before → after.
7
+
8
+ 1. **Bold lead-in + gloss** — open a step with the imperative in bold, then
9
+ explain it.
10
+ - Before: `You should gather the requirements from the user first.`
11
+ - After: `**Gather requirements** — ask the user what task the skill covers.`
12
+
13
+ 2. **Maxim/slogan compression** — fold a rule into one memorable line.
14
+ - Before: `The description matters because it is what the agent uses to decide whether to load the skill.`
15
+ - After: `The description is the only thing the agent sees before loading — write it for the picker, not the reader.`
16
+
17
+ 3. **Prohibition + reason inline (em-dash consequence)** — state the ban and its
18
+ cost on one line.
19
+ - Before: `Do not exceed 100 lines. Long skills are hard to read.`
20
+ - After: `Never exceed ~100 lines — past that the agent skims and drops steps.`
21
+
22
+ 4. **Literal phrasing in quotes** — quote the exact words the agent must emit or
23
+ match.
24
+ - Before: `End the description with a phrase about when to use it.`
25
+ - After: `End the description with "Use when …" so the trigger is matchable verbatim.`
26
+
27
+ 5. **Vocabulary hygiene (real term, ban synonym)** — name a thing once, forbid
28
+ its synonyms.
29
+ - Before: `Put your docs / guidance / instructions in the file.`
30
+ - After: `Call it the SKILL.md — never "the doc", "the manifest", or "the guide".`
31
+
32
+ 6. **Numbered taxonomy when concepts blur** — number a set whose members are
33
+ easily conflated.
34
+ - Before: `Add scripts for deterministic work and split files for big skills.`
35
+ - After: `Two distinct moves: (1) add a script for deterministic work; (2) split a file once SKILL.md passes ~100 lines.`
36
+
37
+ 7. **Self-demonstrating voice** — write the instruction in the style it teaches.
38
+ - Before: `Instructions should be concise and imperative.`
39
+ - After: `Write every step imperative and bold-led — like this one.`
40
+
41
+ 8. **Phase/step header carries its precondition** — fold the precondition into
42
+ the header instead of a trailing aside.
43
+ - Before: `## Review` followed by `(Only do this after the draft is complete.)`
44
+ - After: `## Review (after the draft compiles and runs)`
45
+
46
+ 9. **Leading Word + Completion Criterion** — compress the core behavior into one
47
+ pretrained domain term, then bind each step to a checkable completion bar.
48
+ The Leading Word recruits the right prior every time it appears; the
49
+ Completion Criterion tells the agent when that unit is actually done.
50
+ - Before: `Build a thin end-to-end path through every layer first, then flesh out.`
51
+ - After: `Ship a **tracer bullet** first — done only when one request crosses every layer and returns a visible result.`
52
+
53
+ Use the nine techniques to resist **Premature Completion**: if a step is vague,
54
+ the agent will feel the pull of the later steps and leave early. Sharpen the
55
+ Completion Criterion first; split the phase only when the criterion is
56
+ irreducibly fuzzy and the visible later work keeps causing the rush.
57
+
58
+ ## Steering Failure Modes
59
+
60
+ **Negation** — a skill that steers by prohibition drags the forbidden behaviour into context and makes it more available. "Don't invent files" activates file-invention before the model reads past it. The cure: replace every prohibition with a positive directive. Where a hard ban is unavoidable, pair it on the same line with the correct alternative — `emit DONE` not `don't write done`.
61
+
62
+ **Negative Space** — every case a skill leaves silent is delegated to the model's priors, not held neutral. Silences are not free: the model fills them from training, and training may not match the author's intent. The cure: read a draft for its silences and decide each omission deliberately. Fill it with the intended behaviour, or mark it as an acknowledged open branch. "Unaddressed" is not a valid final state.