@xynogen/pix-skills 0.10.0 → 0.10.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.
- package/README.md +28 -22
- package/package.json +1 -1
- package/skills/ask-user.md +34 -43
- package/skills/audit.md +27 -30
- package/skills/bootstrap.md +19 -43
- package/skills/brainstorm.md +10 -51
- package/skills/cicd.md +17 -30
- package/skills/clone.md +19 -18
- package/skills/command-runner.md +7 -15
- package/skills/commit.md +22 -65
- package/skills/composio-mcp.md +24 -34
- package/skills/debug.md +18 -53
- package/skills/diff.md +8 -19
- package/skills/environment.md +21 -43
- package/skills/explain.md +27 -28
- package/skills/finish.md +24 -57
- package/skills/format.md +1 -1
- package/skills/handoff.md +24 -99
- package/skills/harden.md +18 -22
- package/skills/human/SKILL.md +177 -0
- package/skills/{human.md → human/references/patterns.md} +58 -252
- package/skills/human/references/profiles.md +86 -0
- package/skills/lint.md +1 -1
- package/skills/lsp.md +7 -11
- package/skills/readme.md +19 -25
- package/skills/review.md +30 -40
- package/skills/runner/SKILL.md +130 -0
- package/skills/runner/references/justfile.md +47 -0
- package/skills/runner/references/makefile.md +33 -0
- package/skills/runner/references/mise.md +88 -0
- package/skills/runner/references/npm-scripts.md +27 -0
- package/skills/runner/references/run-sh.md +46 -0
- package/skills/runner/references/taskfile.md +50 -0
- package/skills/search.md +22 -32
- package/skills/subagent.md +37 -353
- package/skills/suggest.md +10 -38
- package/skills/task.md +17 -37
- package/skills/tdd.md +1 -1
- package/skills/test.md +13 -46
- package/skills/tldr.md +12 -22
- package/skills/toon-json.md +11 -35
- package/skills/ui.md +8 -19
- package/skills/verify.md +14 -44
- package/skills/runner.md +0 -419
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Pi coding agent extension — skill loader tool + skills bundle.
|
|
|
7
7
|
| Resource | Type | Description |
|
|
8
8
|
|---|---|---|
|
|
9
9
|
| `read_skills` | tool | Browse local skills, search Skills.sh, explicitly fetch/cache a selected public GitHub skill, read references, and copy bundled resources. |
|
|
10
|
-
| `skills/` | skills |
|
|
10
|
+
| `skills/` | skills | 33 bundled skills (off-context by default — discovered on demand via `read_skills`) |
|
|
11
11
|
|
|
12
12
|
## New: Skills.sh search and remote skill cache
|
|
13
13
|
|
|
@@ -147,33 +147,39 @@ as `/skill:<name>` slash commands.
|
|
|
147
147
|
|
|
148
148
|
| Skill | Description |
|
|
149
149
|
|---|---|
|
|
150
|
-
| `ask-user` |
|
|
151
|
-
| `audit` | Security audit, integrity check, and secret/vulnerability scan |
|
|
152
|
-
| `bootstrap` |
|
|
150
|
+
| `ask-user` | Ask 1–4 structured questions before high-stakes, irreversible, or ambiguous decisions |
|
|
151
|
+
| `audit` | Security audit, integrity check, and secret/vulnerability scan with evidence |
|
|
152
|
+
| `bootstrap` | Scaffold a new project or tool from authoritative docs, with install consent |
|
|
153
153
|
| `brainstorm` | Design exploration and spec refinement before implementation |
|
|
154
|
-
| `cicd` |
|
|
155
|
-
| `clone` | Clone
|
|
156
|
-
| `command-runner` | Inspect workspace health
|
|
157
|
-
| `commit` | Split, write, and maintain Conventional-Commit-style commits |
|
|
158
|
-
| `
|
|
159
|
-
| `
|
|
160
|
-
| `
|
|
161
|
-
| `
|
|
162
|
-
| `
|
|
154
|
+
| `cicd` | Two-stage CI/CD release pipeline (validate on push/PR, publish the tested artifact on tag) |
|
|
155
|
+
| `clone` | Clone a git repo into `/tmp/clones` for read-only exploration |
|
|
156
|
+
| `command-runner` | Inspect workspace health from pre-populated git status + diff |
|
|
157
|
+
| `commit` | Split, write, and maintain Conventional-Commit-style commits; secret checks |
|
|
158
|
+
| `composio-mcp` | Safe Composio MCP workflow — prefer direct servers, introspect before writing |
|
|
159
|
+
| `debug` | Root-cause analysis: reproduce, isolate, fix, and prove |
|
|
160
|
+
| `diff` | Review current git changes from pre-populated staged/unstaged diffs |
|
|
161
|
+
| `environment` | Detect OS/distro/kernel/arch before platform-specific commands |
|
|
162
|
+
| `explain` | Trace and explain existing code in plain STE-style language |
|
|
163
|
+
| `finish` | Branch completion — verify, decide merge/PR/keep, clean up |
|
|
164
|
+
| `format` | Select and run the project's formatter, check mode before write mode |
|
|
163
165
|
| `handoff` | Toggle session handoff — write or read+delete `HANDOFF.md` |
|
|
164
|
-
| `
|
|
166
|
+
| `harden` | Retrofit a fail-fast static-analysis gate onto an existing project |
|
|
167
|
+
| `human` | Audit and rewrite text to remove AI writing patterns (bundle with references) |
|
|
168
|
+
| `lint` | Select and run the project's linter (LSP diagnostics first) and fix findings |
|
|
169
|
+
| `lsp` | Select, install with consent, and configure a language server in `.pi/lsp.json` |
|
|
165
170
|
| `readme` | Create or update a deployment-focused README in a fixed style |
|
|
166
|
-
| `review` |
|
|
167
|
-
| `runner` | Generate or convert a task runner (just/make/mise/task/npm/sh) |
|
|
168
|
-
| `search` | Deep
|
|
169
|
-
| `
|
|
171
|
+
| `review` | Strict code review by severity, ending in a Pass / Pass with suggestions / Fail verdict |
|
|
172
|
+
| `runner` | Generate or convert a task runner (just/make/mise/task/npm/sh; bundle with references) |
|
|
173
|
+
| `search` | Deep code discovery and project context mapping with grep, graph, and LSP |
|
|
174
|
+
| `subagent` | Decompose work and fan out independent units to parallel `agent` workers |
|
|
175
|
+
| `suggest` | Ranked optimization and improvement recommendations |
|
|
170
176
|
| `task` | Task orchestration and ambiguity resolution |
|
|
171
|
-
| `
|
|
177
|
+
| `tdd` | Test-first development: red, green, refactor |
|
|
178
|
+
| `test` | Run tests, analyze failures, and fix them |
|
|
172
179
|
| `tldr` | Maximum-density technical summary, zero filler |
|
|
173
|
-
| `toon-json` |
|
|
180
|
+
| `toon-json` | Shrink dense JSON for context with jq + TOON |
|
|
174
181
|
| `ui` | UI/UX design and implementation guidance for frontends |
|
|
175
|
-
| `verify` | Verification before completion —
|
|
176
|
-
| `subagent` | Plan, decompose, and fan out independent units to cheaper parallel subagent workers |
|
|
182
|
+
| `verify` | Verification before completion — prove it is actually fixed |
|
|
177
183
|
|
|
178
184
|
## Command interpolation
|
|
179
185
|
|
package/package.json
CHANGED
package/skills/ask-user.md
CHANGED
|
@@ -1,49 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ask-user
|
|
3
|
-
description:
|
|
4
|
-
metadata:
|
|
5
|
-
short-description: Decision gate for ambiguity and high-stakes choices
|
|
3
|
+
description: Decision gate for high-stakes or irreversible choices and unclear requirements. Gathers evidence, then makes one focused ask_user call with 2-4 options per question. Use before changing architecture, schema, APIs, deploys, or security, or when a wrong guess is costly to undo.
|
|
6
4
|
disable-model-invocation: true
|
|
7
5
|
---
|
|
8
|
-
|
|
9
6
|
# ask_user decision gate
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
1.
|
|
24
|
-
2.
|
|
25
|
-
3.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
- after
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
##
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
asking without context · trivial formatting choices · forcing options when freeform fits ·
|
|
45
|
-
repeat questions w/o new info · proceeding high-stakes after unclear/cancelled answer.
|
|
46
|
-
|
|
47
|
-
## On cancel / unclear
|
|
48
|
-
Pause, explain what's blocked. At most one narrower follow-up.
|
|
49
|
-
Then: high-stakes → stay blocked until explicit decision; ambiguity-only → proceed only if user delegated.
|
|
8
|
+
## Gate — ask before you act if any is true
|
|
9
|
+
|
|
10
|
+
- The step changes architecture, schema, API, deploy, or security.
|
|
11
|
+
- The step is costly to undo (large refactor, migration, destructive edit, production behavior).
|
|
12
|
+
- Requirements are unclear, conflict, or are missing.
|
|
13
|
+
- Several options are valid and the choice depends on preference.
|
|
14
|
+
- You are about to assume something that changes the implementation.
|
|
15
|
+
|
|
16
|
+
Skip the gate if the user already decided this exact trade-off.
|
|
17
|
+
|
|
18
|
+
## Steps
|
|
19
|
+
|
|
20
|
+
1. Gather evidence first (read, search, web). Never ask blind.
|
|
21
|
+
2. Write 3-7 bullets: current state, constraints, trade-offs, your recommendation.
|
|
22
|
+
3. Call `ask_user` once. Group related questions in that call (max 4).
|
|
23
|
+
- Each question: 2-4 options, a `header` of 16 characters or fewer (count them: "DB path", not "Database Setup"), labels of 1-5 words, and a `description` with the trade-off.
|
|
24
|
+
- Put risk-reducing preconditions into the options (e.g. "Back up, then migrate") so no option skips a safety step.
|
|
25
|
+
- Put the recommended option first and add "(Recommended)" to its label.
|
|
26
|
+
- Use `multiSelect` only for independent choices. Use `preview` to compare code or layouts side by side.
|
|
27
|
+
- Single-select adds a free-text row by itself. Do not add an "Other" option.
|
|
28
|
+
4. Restate the decision, name the next step, and continue.
|
|
29
|
+
|
|
30
|
+
## Budget
|
|
31
|
+
|
|
32
|
+
- One call per decision. Make a second call only if the answer was unclear or cancelled, and make it narrower: proceed with the recommendation / choose another / stop.
|
|
33
|
+
- Still unclear after the second call: high-stakes → stop and report the block. Ambiguity only, and the user said "your call" → take the most reversible default and state your assumptions.
|
|
34
|
+
- Never re-ask the same trade-off without new evidence. No confirmation loops.
|
|
35
|
+
|
|
36
|
+
## Do not
|
|
37
|
+
|
|
38
|
+
- Ask without context, or ask about trivial formatting.
|
|
39
|
+
- Force options where a free answer fits better.
|
|
40
|
+
- Continue a high-stakes step after a cancelled or unclear answer.
|
package/skills/audit.md
CHANGED
|
@@ -1,53 +1,50 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: audit
|
|
3
|
-
description: Security audit,
|
|
3
|
+
description: Security and health audit of a repository — leaked secrets, injection and unsafe input, broken references, vulnerable or unused dependencies — with file:line evidence and severity. Use only on explicit request such as "audit this", "security scan", "check for secrets", "is this safe", or "find vulnerabilities".
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
|
-
# Audit
|
|
6
|
+
# Audit
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Every finding needs `file:line` evidence and a fix. No vague warnings.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Scan
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
If the target is unclear (whole repo, one package, one diff), ask once.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- **Secrets** — Search with the grep tool for API keys, tokens, `password=`, private keys, and connection strings. Search git history only when asked: `git log -p -S'<pattern>'`, or `gitleaks` if it is installed.
|
|
15
|
+
- **Inputs** — Trace untrusted input to sinks: SQL, shell, file paths, deserialization, HTML.
|
|
16
|
+
- **Integrity** — Imports resolve, symlinks are valid, cross-module references hold.
|
|
17
|
+
- **Dependencies** — Known CVEs and outdated packages via the installed tool (`npm audit`, `bun audit`, `pip-audit`, `cargo audit`, `govulncheck`). If none is installed, report "not checked". Do not install one without consent.
|
|
18
|
+
- **Bloat** — Unused dependencies, dead files, duplicate logic.
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
- **SECRETS**: Grep credential patterns — API keys, tokens, `password=`, private keys, connection strings. Check committed files AND history if asked.
|
|
18
|
-
- **INTEGRITY**: Verify imports resolve, symlinks valid, cross-module refs intact.
|
|
19
|
-
- **BLOAT**: Find duplicate logic, unused deps, dead files.
|
|
20
|
-
- **HEALTH**: Flag outdated packages, deprecated APIs, known CVEs.
|
|
21
|
-
- **INPUTS**: Check unvalidated user input → injection, path traversal, unsafe deserialization.
|
|
20
|
+
## Severity
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
- **Critical** — exposed secret, remote code execution, injection (untrusted input reaches a sink with no validation), auth bypass.
|
|
23
|
+
- **Warning** — dependency with a known CVE, weak crypto, missing validation that does not reach a sink.
|
|
24
|
+
- **Info** — dead code, hardening opportunity, style risk.
|
|
25
|
+
|
|
26
|
+
## Report
|
|
24
27
|
|
|
25
28
|
```
|
|
26
|
-
## Audit
|
|
29
|
+
## Audit findings — [scope]
|
|
27
30
|
|
|
28
|
-
###
|
|
31
|
+
### Critical
|
|
29
32
|
- **[Issue]** — `file:line`
|
|
30
|
-
Evidence: [exact
|
|
31
|
-
Fix: [
|
|
33
|
+
Evidence: [exact snippet]
|
|
34
|
+
Fix: [step]
|
|
32
35
|
|
|
33
|
-
###
|
|
36
|
+
### Warning
|
|
34
37
|
- **[Issue]** — `file:line` · Fix: [step]
|
|
35
38
|
|
|
36
|
-
###
|
|
39
|
+
### Info
|
|
37
40
|
- **[Issue]** — `file:line` · Note: [context]
|
|
38
41
|
|
|
39
42
|
## Summary
|
|
40
|
-
[N critical, N warning, N info.
|
|
43
|
+
[N critical, N warning, N info. Scanned: [what]. Not checked: [what]. Fix first: [item].]
|
|
41
44
|
```
|
|
42
45
|
|
|
43
|
-
##
|
|
44
|
-
|
|
45
|
-
- **🔴 Critical**: exposed secret, RCE, injection, auth bypass. Fix first.
|
|
46
|
-
- **🟡 Warning**: outdated dep with CVE, missing input validation, weak crypto.
|
|
47
|
-
- **🔵 Info**: dead code, style risk, hardening opportunity.
|
|
48
|
-
|
|
49
|
-
## Red Flags — STOP
|
|
46
|
+
## Rules
|
|
50
47
|
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
48
|
+
- Never claim "no issues" without listing what you scanned.
|
|
49
|
+
- Never rewrite git history to remove a secret without explicit confirmation. Recommend rotating the key first.
|
|
50
|
+
- More than about 15 findings in one severity: show the top ones and state how many you left out.
|
package/skills/bootstrap.md
CHANGED
|
@@ -1,56 +1,32 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bootstrap
|
|
3
|
-
description:
|
|
3
|
+
description: Scaffolds a new, runnable project skeleton from the stack's official docs — init command, standard layout, pinned dependencies, .env.example, and a passing baseline build or test. Use only on explicit request such as "scaffold a project", "bootstrap this", "init a new service", or "set up a new X app".
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
|
-
# Bootstrap
|
|
6
|
+
# Bootstrap
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Goal: a skeleton that a new developer can clone and run in minutes.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Steps
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
1. **Confirm the stack** — If the language, framework, or package manager is unclear, ask once (`ask_user`). Confirm the target directory is new or empty. Never scaffold over existing files.
|
|
13
|
+
2. **Check the docs** — Read the official setup docs (web fetch or a docs tool). Check every flag with `--help`. Never invent init flags.
|
|
14
|
+
3. **Init** — Run the standard init (`bun init`, `npm init -y`, `cargo init`, `go mod init`, `uv init`, ...). Use the ecosystem's standard layout.
|
|
15
|
+
4. **Dependencies** — Install only what the user named or the stack needs. Pin versions. Ask before the first network install.
|
|
16
|
+
5. **Env** — Write `.env.example` with placeholders for every required variable. Never write real secrets or a real `.env`.
|
|
17
|
+
6. **Extras** — Add a linter, formatter, or CI only if the user asked. Otherwise offer them in the report.
|
|
18
|
+
7. **Baseline** — Run the build or test command once and confirm it passes. If the fresh skeleton has no test command, say so; do not invent one. If the baseline fails twice, stop and report.
|
|
13
19
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- **AUTO-RUN**: Run setup commands without confirmation unless input required.
|
|
17
|
-
- **RESEARCH**: Use authoritative docs for target language/framework setup. Don't guess flags — verify with `--help` or docs.
|
|
18
|
-
- **CONFIRM STACK**: Language/framework/package-manager ambiguous → ask one question before scaffolding.
|
|
19
|
-
|
|
20
|
-
### Phase 2: Scaffold
|
|
21
|
-
|
|
22
|
-
- **INIT**: Run standard init (`npm init -y`, `cargo init`, `go mod init`, `uv init`, etc.).
|
|
23
|
-
- **STRUCTURE**: Create standard layout — `src/`, `tests/`, `docs/`. Mirror community conventions for that ecosystem.
|
|
24
|
-
- **DEPENDENCIES**: Install core libs via project manager. Pin versions.
|
|
25
|
-
- **ENVIRONMENT**: Generate `.env.example`; document every required env var. Never write real secrets.
|
|
26
|
-
- **TOOLING**: Set up linter, formatter, CI config matching ecosystem defaults.
|
|
27
|
-
|
|
28
|
-
### Phase 3: Verify
|
|
29
|
-
|
|
30
|
-
- Run project build/test command. Confirm clean baseline passes.
|
|
31
|
-
- Confirm `README` or `.env.example` lists everything needed to run.
|
|
32
|
-
|
|
33
|
-
### Phase 4: Report
|
|
20
|
+
## Report
|
|
34
21
|
|
|
35
22
|
```
|
|
36
|
-
## Scaffolded: [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
src/ ...
|
|
41
|
-
tests/ ...
|
|
42
|
-
|
|
43
|
-
**Run it:**
|
|
23
|
+
## Scaffolded: [name]
|
|
24
|
+
Stack: [language / framework / package manager]
|
|
25
|
+
Layout: [top-level tree]
|
|
26
|
+
Run it:
|
|
44
27
|
1. [command]
|
|
45
28
|
2. [command]
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
29
|
+
Env vars: see `.env.example`
|
|
30
|
+
Baseline: `[command]` → PASS
|
|
31
|
+
Optional next: [linter / formatter / CI, if not added]
|
|
49
32
|
```
|
|
50
|
-
|
|
51
|
-
## Red Flags — STOP
|
|
52
|
-
|
|
53
|
-
- Scaffolding before confirming ambiguous stack.
|
|
54
|
-
- Inventing init flags instead of checking docs.
|
|
55
|
-
- Writing real secrets into `.env` (use `.env.example` with placeholders).
|
|
56
|
-
- Declaring done without running baseline build/test once.
|
package/skills/brainstorm.md
CHANGED
|
@@ -1,58 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: brainstorm
|
|
3
|
-
description:
|
|
3
|
+
description: Explores and refines a design before any code is written — clarifies goals, compares 2-3 approaches, and gets the design approved section by section. Use when the user wants to design, spec, or think through a new feature, system, or project, or says "let's brainstorm" or "how should we build X".
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
|
-
# Brainstorm
|
|
6
|
+
# Brainstorm
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
**Hard gate:** write no code, scaffold nothing, and take no implementation action until the user approves a design. This applies to every request, however simple it looks.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
DO NOT write code, scaffold project, or take implementation action
|
|
12
|
-
until you present a design AND user approves it.
|
|
13
|
-
```
|
|
10
|
+
## Steps
|
|
14
11
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- Check existing files, docs, recent git commits.
|
|
22
|
-
- Understand what already exists before proposing anything new.
|
|
23
|
-
|
|
24
|
-
### Step 2: Ask Clarifying Questions
|
|
25
|
-
|
|
26
|
-
- Ask ONE question at a time. Don't overwhelm.
|
|
27
|
-
- Prefer multiple-choice when possible.
|
|
28
|
-
- Focus on: purpose, constraints, success criteria, edge cases.
|
|
29
|
-
- Continue until you understand full scope.
|
|
30
|
-
|
|
31
|
-
### Step 3: Propose 2-3 Approaches
|
|
32
|
-
|
|
33
|
-
- Present distinct approaches with trade-offs.
|
|
34
|
-
- Lead with recommended option, explain WHY.
|
|
35
|
-
- Apply YAGNI ruthlessly — remove unnecessary features from all proposals.
|
|
36
|
-
|
|
37
|
-
### Step 4: Present Design for Approval
|
|
38
|
-
|
|
39
|
-
- Present design in sections scaled to complexity.
|
|
40
|
-
- Cover: architecture, components, data flow, error handling, testing strategy.
|
|
41
|
-
- Ask approval after each section. Revise if needed.
|
|
42
|
-
|
|
43
|
-
### Step 5: Write Design Doc
|
|
44
|
-
|
|
45
|
-
- Save validated design to `docs/plans/YYYY-MM-DD-<topic>-design.md`.
|
|
46
|
-
- Commit design document to git.
|
|
47
|
-
|
|
48
|
-
### Step 6: Transition to Implementation
|
|
49
|
-
|
|
50
|
-
- Run `/plan` and pick "+ New plan" to write the detailed implementation plan.
|
|
51
|
-
- Do NOT start coding directly. `/plan` is next step.
|
|
52
|
-
|
|
53
|
-
## Key Principles
|
|
54
|
-
|
|
55
|
-
- **One question at a time** — Don't overwhelm
|
|
56
|
-
- **YAGNI ruthlessly** — Remove unnecessary features from all designs
|
|
57
|
-
- **Explore alternatives** — Always propose 2-3 approaches before settling
|
|
58
|
-
- **Incremental validation** — Present design, get approval before moving on
|
|
12
|
+
1. **Explore** — Read the existing files, docs, and recent commits. Know what exists before you propose anything.
|
|
13
|
+
2. **Clarify** — Use `ask_user` for purpose, constraints, success criteria, and edge cases. Group up to 4 related questions per call. Prefer options to open questions. Continue until the scope is clear.
|
|
14
|
+
3. **Propose 2-3 approaches** — Show distinct options with their trade-offs. Lead with your recommendation and say why. Cut every feature the goal does not need (YAGNI).
|
|
15
|
+
4. **Present the design** — Scale the sections to the complexity: architecture, components, data flow, error handling, testing. Get approval after each section. Revise as needed.
|
|
16
|
+
5. **Write it down** — Save the approved design to `docs/plans/YYYY-MM-DD-<topic>-design.md`. Offer to commit it. Do not commit without a request.
|
|
17
|
+
6. **Hand off** — The next step is `/plan` → "+ New plan" for the implementation plan. Do not start coding from here.
|
package/skills/cicd.md
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cicd
|
|
3
|
-
description:
|
|
3
|
+
description: Sets up a two-stage CI/CD release pipeline (validate on push/PR, publish on tag) for any language and most git-hosting platforms — GitHub Actions, Forgejo/Gitea Actions, GitLab CI. Use only on explicit request — "set up CI/CD", "add a release pipeline", "wire up publishing".
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
|
-
# CI/CD
|
|
7
|
-
|
|
8
|
-
## Goal
|
|
6
|
+
# CI/CD release pipeline
|
|
9
7
|
|
|
10
8
|
Two stages, one invariant. **CI** validates every push/PR (fast) and can build+upload the artifact. **Publish** (on a version tag) re-runs the same CI, then downloads that exact artifact and ships it — never rebuilds.
|
|
11
9
|
|
|
@@ -19,19 +17,19 @@ tag vX.Y ──► publish ──┬─ ci (full: lint · test:full grid · bui
|
|
|
19
17
|
|
|
20
18
|
Do not scaffold projects (`bootstrap`) or retrofit lint/type gates (`harden`) — this is only the release pipeline. It assumes a working test/gate command already exists; if not, stop and point at `harden`.
|
|
21
19
|
|
|
22
|
-
##
|
|
20
|
+
## 1. Detect (read-only)
|
|
23
21
|
|
|
24
22
|
- **Platform** — GitHub Actions (`.github/workflows/`), Forgejo/Gitea Actions (`.forgejo/workflows/` or `.gitea/workflows/`), GitLab CI (`.gitlab-ci.yml`), Woodpecker, Drone. This decides syntax and which security features exist (see matrix below).
|
|
25
23
|
- **Language + registry** — what gets published and where (npm, PyPI, crates.io, Maven Central, container registry, GitHub/Gitea Releases).
|
|
26
24
|
- **Existing gate** — the local command that lints+tests. CI must call this exact command, never a diverging copy.
|
|
27
25
|
- **Build + artifact naming** — the build command and the dist path/glob.
|
|
28
|
-
- **Verify, don't recall** — confirm action versions, registry auth
|
|
26
|
+
- **Verify, don't recall** — confirm action versions, registry auth, and CLI flags in the docs or with `--help`. If you cannot verify one, ask.
|
|
29
27
|
|
|
30
|
-
##
|
|
28
|
+
## 2. Propose
|
|
31
29
|
|
|
32
30
|
Present the plan before writing any workflow file: platform, the two files, publish trigger (tag vs release), auth mechanism (OIDC vs token — see matrix), and dependency-bot choice. Get approval. Publishing is irreversible; the pipeline that does it needs sign-off.
|
|
33
31
|
|
|
34
|
-
##
|
|
32
|
+
## 3. Apply
|
|
35
33
|
|
|
36
34
|
### 1. One callable CI file, matrix toggle
|
|
37
35
|
|
|
@@ -47,7 +45,7 @@ on:
|
|
|
47
45
|
`matrix: { v: ${{ inputs.full && fromJSON('["a","b","c"]') || fromJSON('["c"]') }} }`
|
|
48
46
|
- `fail-fast: false` — one cell failing must not hide the others.
|
|
49
47
|
- **Lint in its own job**, once — it is version-independent, don't pay for it per matrix cell.
|
|
50
|
-
- **Build+upload job** runs the build, validates package metadata with the ecosystem's own check (`npm pack --dry-run`, `cargo package`, `twine check`, `mvn verify`, `
|
|
48
|
+
- **Build+upload job** runs the build, validates package metadata with the ecosystem's own check (`npm pack --dry-run`, `cargo package`, `twine check`, `mvn verify`, `goreleaser check` + `goreleaser release --snapshot`, `docker build`), and uploads the built artifact.
|
|
51
49
|
|
|
52
50
|
### 2. Publish reuses CI, downloads the artifact
|
|
53
51
|
|
|
@@ -85,22 +83,17 @@ A dependency bot rotates SHA pins so they don't rot, with a cooldown to skip bra
|
|
|
85
83
|
| Workflow dir | `.github/workflows/` | `.forgejo/` or `.gitea/workflows/` | `.gitlab-ci.yml` |
|
|
86
84
|
| Syntax | Actions YAML | **Actions-compatible** (most `uses:` run) | GitLab pipeline YAML (different model) |
|
|
87
85
|
| Reusable CI | `workflow_call` | `workflow_call` (recent versions) | `include:` + `extends`/`!reference` |
|
|
88
|
-
| OIDC publish |
|
|
89
|
-
| `permissions
|
|
90
|
-
| Dependabot |
|
|
86
|
+
| OIDC publish | yes, broad (PyPI, npm, ...) | limited; use a scoped token | yes (`id_tokens`) for supported registries |
|
|
87
|
+
| `permissions` / `id-token` | yes | yes (version-dependent) | via `id_tokens:` |
|
|
88
|
+
| Dependabot | yes | not supported | not supported (own scanners) |
|
|
91
89
|
| Dependency-bot fallback | Dependabot | **Renovate** (self-host or Mend; supports Gitea/Forgejo) | **Renovate**, or GitLab's dep scanning |
|
|
92
|
-
| Pin actions by SHA |
|
|
93
|
-
|
|
94
|
-
**Portability rules:**
|
|
90
|
+
| Pin actions by SHA | yes | yes | pin images by `@sha256:` digest |
|
|
95
91
|
|
|
96
|
-
|
|
97
|
-
- Do **not** assume Dependabot — it is GitHub-only. On Forgejo/Gitea/GitLab use Renovate. State the choice in Phase 2.
|
|
98
|
-
- Do **not** assume OIDC — check the platform+registry pair. Fall back to a scoped token and say so.
|
|
99
|
-
- Forgejo/Gitea Actions runs most GitHub actions, but SHA-pinned third-party actions must be reachable from that instance's configured registry (often a GitHub mirror) — verify before relying on one.
|
|
92
|
+
The shape (validate → tag → reuse CI → publish the tested artifact) is the same everywhere; only trigger syntax, auth, and the bot change. Forgejo/Gitea Actions runs most GitHub actions, but SHA-pinned third-party actions must be reachable from that instance's configured registry (often a GitHub mirror) — verify before relying on one.
|
|
100
93
|
|
|
101
|
-
##
|
|
94
|
+
## 4. Verify and report
|
|
102
95
|
|
|
103
|
-
-
|
|
96
|
+
- Ask before you push a branch to trigger CI. It must go green. Never push a release tag yourself; the user does that.
|
|
104
97
|
- Do a dry-run publish if the registry offers one (`npm publish --dry-run`, `cargo publish --dry-run`, TestPyPI, a staging registry) before a real tag.
|
|
105
98
|
- Confirm the publish job **downloads** the artifact and has no build step.
|
|
106
99
|
- Confirm CI runs the same gate command as local.
|
|
@@ -114,13 +107,7 @@ A dependency bot rotates SHA pins so they don't rot, with a cooldown to skip bra
|
|
|
114
107
|
**Pins:** actions @SHA · deps via [Dependabot/Renovate]
|
|
115
108
|
```
|
|
116
109
|
|
|
117
|
-
##
|
|
110
|
+
## Stop if
|
|
118
111
|
|
|
119
|
-
-
|
|
120
|
-
- Publish not gated on a green CI run of the tagged commit.
|
|
121
|
-
- Long-lived registry token in secrets when OIDC is available for that platform+registry.
|
|
122
|
-
- `permissions: write-all` or a token persisted on the runner.
|
|
123
|
-
- Mutable action tags (`@v5`) instead of SHA pins.
|
|
124
|
-
- Concurrency cancellation on the publish workflow.
|
|
125
|
-
- Assuming Dependabot on a non-GitHub host, or OIDC without verifying the registry supports it.
|
|
126
|
-
- CI command that diverges from the local gate.
|
|
112
|
+
- The publish job builds anything. It must download the CI artifact.
|
|
113
|
+
- Publish is not gated on a green CI run of the tagged commit.
|
package/skills/clone.md
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: clone
|
|
3
|
-
description: Temporarily
|
|
3
|
+
description: Temporarily clones an external git repository into /tmp/clones for read-only exploration and reports its stack and layout. Use only when the user's goal is to inspect or analyze a repository. Do not use for working copies, edits, or a destination the user named.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
|
-
#
|
|
6
|
+
# Clone for exploration
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
**Fit check:** use this only for temporary, read-only exploration. Do not use it when the user asks to clone "here", names a destination, needs a working copy, or plans to modify the repo. A git URL or the word "clone" alone is not enough.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **URL** — Accept https, ssh, or `owner/repo`. Expand `owner/repo` to `https://github.com/owner/repo` only when the user gave no host.
|
|
13
|
+
2. **Target** — `/tmp/clones/<repo-name>` (repo name from the URL, without `.git`). Run `mkdir -p /tmp/clones` first.
|
|
14
|
+
3. **Clone or refresh**
|
|
15
|
+
- Path is a git repo → `git -C <path> fetch --all --prune`. Do not re-clone.
|
|
16
|
+
- Path exists but is not a git repo → stop and report.
|
|
17
|
+
- Otherwise → `git clone --depth=1 <url> <path>`. Full history requested → no `--depth`, or `git -C <path> fetch --unshallow` on an existing clone.
|
|
18
|
+
- Clone fails (auth, 404) → report the error and stop. Do not try other URLs.
|
|
19
|
+
4. **Orient** — Run only what the question needs. Default: `ls <path>`, the first 50 lines of `README.md`, the manifest (`package.json`, `Cargo.toml`, `go.mod`, `pyproject.toml`, ...), and `git -C <path> log --oneline -5`.
|
|
20
|
+
5. **Report** — `Repo ready at /tmp/clones/<name> — <stack> — <N> entries at root.` Then answer the user's question.
|
|
21
|
+
|
|
22
|
+
## Rules
|
|
23
|
+
|
|
24
|
+
- Read-only. Never commit, push, or edit files in the clone unless the user asks.
|
|
25
|
+
- `/tmp` is cleared on reboot. Tell the user if they need a persistent copy.
|
package/skills/command-runner.md
CHANGED
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: command-runner
|
|
3
|
-
description:
|
|
3
|
+
description: Checks workspace health from live git status and diff before running automation, and asks before it stages anything. Use before a scripted or bulk operation that needs a known, clean working tree.
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
|
+
# Command Runner
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## Pre-Populated Git Context
|
|
10
|
-
|
|
11
|
-
The blocks below are populated with live repository state at skill-load time
|
|
12
|
-
via `\!`cmd`` directives — read them before acting.
|
|
13
|
-
|
|
14
|
-
### Working tree status
|
|
8
|
+
## State (live at load time)
|
|
15
9
|
|
|
16
10
|
!`git status -s`
|
|
17
11
|
|
|
18
|
-
### Active diff
|
|
19
|
-
|
|
20
12
|
!`git diff HEAD`
|
|
21
13
|
|
|
22
|
-
##
|
|
14
|
+
## Steps
|
|
23
15
|
|
|
24
|
-
1.
|
|
25
|
-
2.
|
|
26
|
-
3.
|
|
16
|
+
1. Read the status and diff above.
|
|
17
|
+
2. Unstaged files exist → ask before you stage them.
|
|
18
|
+
3. Continue with automation only if the tree is clean or the user overrides.
|