skillshop 2.0.0 → 2.2.0
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 +273 -100
- package/agents-content/000_communication-writing.block.md +11 -0
- package/agents-content/001_external-actions.block.md +9 -0
- package/agents-content/AGENTS.md +11 -0
- package/package.json +6 -3
- package/skills-content/architecture-scanner/SKILL.md +274 -0
- package/skills-content/architecture-scanner/files.json +10 -0
- package/skills-content/architecture-scanner/scan.sh +823 -0
- package/skills-content/change-review/SKILL.md +76 -0
- package/skills-content/change-review/agents/openai.yaml +4 -0
- package/skills-content/changelog/SKILL.md +99 -0
- package/skills-content/changeset/changeset.md +80 -0
- package/skills-content/code-buddy/SKILL.md +136 -0
- package/skills-content/design-system-catalog/SKILL.md +106 -0
- package/skills-content/design-system-catalog/extract-components.mjs +441 -0
- package/skills-content/design-system-catalog/generate-catalog.sh +255 -0
- package/skills-content/flare/SKILL.md +96 -0
- package/skills-content/grilling/SKILL.md +31 -0
- package/skills-content/install-sigmap/SKILL.md +97 -0
- package/skills-content/one-shot/SKILL.md +51 -0
- package/skills-content/release/SKILL.md +128 -0
- package/skills-content/shadow-clone/SKILL.md +228 -0
- package/skills-content/shadow-clone/extract-signatures.mjs +202 -0
- package/skills-content/shadow-clone/scan-repo.mjs +343 -0
- package/skills-content/ship/SKILL.md +95 -0
- package/skills-content/shots/SKILL.md +89 -0
- package/skills-content/shots/agents/openai.yaml +4 -0
- package/skills-content/skillshop/SKILL.md +157 -0
- package/skills-content/skillz/SKILL.md +15 -0
- package/skills-content/transcript-clean/SKILL.md +55 -0
- package/skills-content/transcript-edit/SKILL.md +80 -0
- package/skills-content/vitest/GENERATION.md +5 -0
- package/skills-content/vitest/SKILL.md +52 -0
- package/skills-content/vitest/references/advanced-environments.md +264 -0
- package/skills-content/vitest/references/advanced-projects.md +300 -0
- package/skills-content/vitest/references/advanced-type-testing.md +237 -0
- package/skills-content/vitest/references/advanced-vi.md +249 -0
- package/skills-content/vitest/references/core-cli.md +166 -0
- package/skills-content/vitest/references/core-config.md +174 -0
- package/skills-content/vitest/references/core-describe.md +193 -0
- package/skills-content/vitest/references/core-expect.md +219 -0
- package/skills-content/vitest/references/core-hooks.md +244 -0
- package/skills-content/vitest/references/core-test-api.md +233 -0
- package/skills-content/vitest/references/features-concurrency.md +250 -0
- package/skills-content/vitest/references/features-context.md +238 -0
- package/skills-content/vitest/references/features-coverage.md +207 -0
- package/skills-content/vitest/references/features-filtering.md +211 -0
- package/skills-content/vitest/references/features-mocking.md +265 -0
- package/skills-content/vitest/references/features-snapshots.md +207 -0
- package/skills-content/workleaf/SKILL.md +77 -0
- package/skills-content/worklog/SKILL.md +145 -0
- package/skills-content/worklog/references/summary-format.md +114 -0
- package/skills-content/worktree/SKILL.md +71 -0
- package/src/agents-instructions.js +256 -0
- package/src/cli.js +87 -23
- package/src/import.js +12 -7
- package/src/index.js +1 -0
- package/src/legacy-agents-content.js +36 -0
- package/src/legacy-cli.js +1822 -0
- package/src/library.js +9 -0
- package/src/specifier.js +11 -0
- package/src/user-install.js +48 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flare
|
|
3
|
+
description: Runs the current app's local web server and exposes it with a Cloudflare Quick Tunnel using the `cloudflared` CLI. Use when the user invokes `/flare`, says "flare it", "flare this app", "tunnel it", or asks for a temporary public URL to the local app.
|
|
4
|
+
metadata:
|
|
5
|
+
author: Daniel Fosco
|
|
6
|
+
version: "2026.8.31"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Flare
|
|
10
|
+
|
|
11
|
+
> Triggered by: `/flare`, "flare it", "flare this", "flare the app", "tunnel it", "give me a public URL"
|
|
12
|
+
|
|
13
|
+
Start or reuse the current application's local web server, then expose it through a temporary `trycloudflare.com` URL with `cloudflared`.
|
|
14
|
+
|
|
15
|
+
## 1. Identify the app server
|
|
16
|
+
|
|
17
|
+
Inspect repository guidance, package scripts, lockfiles, workspace configuration, and framework configuration before running anything. Use the app and command implied by the user's current directory and request.
|
|
18
|
+
|
|
19
|
+
- Prefer a documented development command such as `npm run dev`, `pnpm dev`, `yarn dev`, or the repository's equivalent.
|
|
20
|
+
- In a monorepo, run the command from the relevant app directory or use its documented workspace filter. Do not expose an arbitrary sibling app.
|
|
21
|
+
- Reuse an already-running server only when its process, port, and response clearly belong to the requested app.
|
|
22
|
+
- Do not install dependencies, choose between several plausible apps, or invent a server command without asking one short question.
|
|
23
|
+
- Bind only to loopback when the framework supports it. A Cloudflare tunnel does not require the server to listen on `0.0.0.0`.
|
|
24
|
+
|
|
25
|
+
Determine the local URL from configuration or startup output. Do not assume a framework's default port if the app selected another available port.
|
|
26
|
+
|
|
27
|
+
## 2. Check prerequisites and exposure risk
|
|
28
|
+
|
|
29
|
+
Verify that `cloudflared` is available:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
cloudflared --version
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If it is missing, report that clearly and ask before installing system software. Use the platform's official Cloudflare package or installation instructions; do not substitute an unrelated npm wrapper.
|
|
36
|
+
|
|
37
|
+
The user's flare request authorizes creating a temporary public tunnel, but not exposing obviously sensitive data. Before tunneling, stop for confirmation if the app is an admin surface, bypasses authentication in development, contains customer data, or grants destructive capabilities. Never print or place secrets in the public URL, command arguments, or logs.
|
|
38
|
+
|
|
39
|
+
## 3. Start and verify the server
|
|
40
|
+
|
|
41
|
+
If no suitable server is already running, create a temporary run directory and start the repository-native command as a detached process. Keep logs and the process ID so the user can diagnose and stop it later.
|
|
42
|
+
|
|
43
|
+
Example shape, adapted to the actual command rather than copied blindly:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
run_dir="$(mktemp -d "${TMPDIR:-/tmp}/flare.XXXXXX")"
|
|
47
|
+
nohup npm run dev >"$run_dir/server.log" 2>&1 &
|
|
48
|
+
printf '%s\n' "$!" >"$run_dir/server.pid"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Read the startup log until the actual local URL is known. Verify that URL with `curl` or an equivalent HTTP request before starting the tunnel. A redirect or expected authentication response can be healthy; connection failures and server errors are not. If startup fails, inspect the server log, fix only issues within the user's requested scope, and do not launch a tunnel to a dead port.
|
|
52
|
+
|
|
53
|
+
When reusing an existing server, still create a run directory for the tunnel metadata, but do not claim ownership of or stop that server during cleanup.
|
|
54
|
+
|
|
55
|
+
## 4. Start the Quick Tunnel
|
|
56
|
+
|
|
57
|
+
Start `cloudflared` detached against the verified loopback URL:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
nohup cloudflared tunnel --no-autoupdate --url "http://127.0.0.1:PORT" >"$run_dir/cloudflared.log" 2>&1 &
|
|
61
|
+
printf '%s\n' "$!" >"$run_dir/cloudflared.pid"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Use the app's actual scheme, host, and port in place of the example. This is a Quick Tunnel; do not create DNS records, log into a Cloudflare account, or configure a named tunnel unless the user explicitly asks for a persistent tunnel.
|
|
65
|
+
|
|
66
|
+
Quick Tunnels are incompatible with a default `config.yaml` in the user's `.cloudflared` directory. If one exists, leave it untouched, create an empty YAML file inside `run_dir`, and pass it explicitly with `--config "$run_dir/quick-tunnel.yml"`. Verify `--config` support in `cloudflared tunnel --help` before doing so. Never rename, edit, or replace the user's named-tunnel configuration.
|
|
67
|
+
|
|
68
|
+
Watch `cloudflared.log` for the generated `https://*.trycloudflare.com` URL and for early process failure. Allow startup time, but use a bounded wait rather than leaving a foreground command blocked indefinitely.
|
|
69
|
+
|
|
70
|
+
Request the public URL once to verify that it reaches the app. If verification fails, inspect both logs and stop processes started by this run rather than reporting a broken URL.
|
|
71
|
+
|
|
72
|
+
## 5. Report and manage lifecycle
|
|
73
|
+
|
|
74
|
+
On success, report:
|
|
75
|
+
|
|
76
|
+
- the public `https://*.trycloudflare.com` URL;
|
|
77
|
+
- the local app URL and server command;
|
|
78
|
+
- whether the server was started or reused;
|
|
79
|
+
- the temporary run directory containing logs and PID files;
|
|
80
|
+
- that the URL is for development only, has no uptime guarantee, does not support Server-Sent Events, and remains available only while `cloudflared` is running;
|
|
81
|
+
- an exact cleanup command for processes this run started.
|
|
82
|
+
|
|
83
|
+
Use graceful process termination for cleanup. For a server started by this run, the cleanup shape is:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
kill "$(cat "$run_dir/cloudflared.pid")" "$(cat "$run_dir/server.pid")"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
If the server was reused, omit its PID and stop only `cloudflared`. Do not use broad commands such as `pkill cloudflared`, because they can terminate unrelated tunnels. Do not delete the run directory until its processes have stopped; retain failed-run logs long enough to report the cause.
|
|
90
|
+
|
|
91
|
+
## Failure rules
|
|
92
|
+
|
|
93
|
+
- Do not report a public URL unless both the local and tunneled HTTP checks succeed.
|
|
94
|
+
- If either detached process exits early, report the relevant log output and clean up the other process if this run started it.
|
|
95
|
+
- Never silently switch to a production server, deploy the app, expose a different port, or weaken application authentication to make the tunnel work.
|
|
96
|
+
- Treat the random hostname as public. Quick Tunnels provide transport, not application authorization.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grilling
|
|
3
|
+
description: Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
|
|
4
|
+
metadata:
|
|
5
|
+
author: Matt Pocock
|
|
6
|
+
version: "2026.10.02"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Interview the user relentlessly until you reach a shared understanding. Map this as a **design tree**: every decision branches into the decisions that hang off it.
|
|
10
|
+
|
|
11
|
+
Work the tree in **rounds**. The **frontier** is every decision whose prerequisites are already settled: the questions you can ask _now_ without guessing at answers you haven't heard yet. Ask the whole frontier in one round: number each question and give your recommended answer. Then wait for the user's answers before the next round.
|
|
12
|
+
|
|
13
|
+
Format a round like so:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
❓ **Q1** - **<question title>**: <question body, might be multiple paragraphs, including multiple choices>
|
|
17
|
+
|
|
18
|
+
➡️ <your recommended answer>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
❓ **Q2** - **<question title>**: <question body, might be multiple paragraphs, including multiple choices>
|
|
23
|
+
|
|
24
|
+
➡️ <your recommended answer>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Each round the user answers reshapes the tree: settled decisions push the frontier outward and unblock questions that depended on them. Recompute the frontier and ask the next round. A question whose answer depends on another question still open in this round belongs to a _later_ round, not this one.
|
|
28
|
+
|
|
29
|
+
Finding _facts_ is your job, never the user's. When a frontier question needs a fact from the environment (filesystem, tools, etc.), dispatch a sub-agent to find it; don't ask the user for anything you could look up yourself. Don't block on it: a running exploration is an unsettled prerequisite, so only the questions downstream of it wait for the sub-agent to report; ask the rest of the frontier now. The _decisions_ are the user's: put each to them and wait.
|
|
30
|
+
|
|
31
|
+
The session is done when the frontier is empty: every branch of the design tree visited, nothing left silently assumed. Do not act on it until the user confirms you have reached a shared understanding.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: install-sigmap
|
|
3
|
+
description: Installs and configures SigMap for a repository, including OpenCode MCP wiring, local indexing, generated context, Git ignores, and quiet-by-default agent guidance. Use when setting up SigMap, repository grounding, or SigMap context.
|
|
4
|
+
metadata:
|
|
5
|
+
author: Daniel Fosco
|
|
6
|
+
version: "2026.9.8"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Install SigMap
|
|
10
|
+
|
|
11
|
+
Set up SigMap in the current Git repository. SigMap is a local indexing and
|
|
12
|
+
grounding tool; it must not become unsolicited conversation content.
|
|
13
|
+
|
|
14
|
+
## Procedure
|
|
15
|
+
|
|
16
|
+
Run these commands from the repository root:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install --global sigmap
|
|
20
|
+
sigmap mcp install opencode --global
|
|
21
|
+
sigmap
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The OpenCode installer may write a legacy `~/.config/opencode/config.json`
|
|
25
|
+
entry. OpenCode 1.18+ reads `~/.config/opencode/opencode.json`; ensure that
|
|
26
|
+
file preserves its existing fields and contains this valid MCP entry:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"mcp": {
|
|
31
|
+
"sigmap": {
|
|
32
|
+
"type": "local",
|
|
33
|
+
"command": ["/absolute/path/to/sigmap", "--mcp"],
|
|
34
|
+
"enabled": true
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Use the resolved `sigmap` executable path rather than an ephemeral `npx`
|
|
41
|
+
cache path. Preserve any existing MCP servers and provider settings.
|
|
42
|
+
|
|
43
|
+
## Repository files
|
|
44
|
+
|
|
45
|
+
SigMap's local index belongs in `.context/` and its generated context must not
|
|
46
|
+
be committed. Add these root-anchored entries to `.gitignore`, preserving
|
|
47
|
+
existing rules and avoiding duplicates:
|
|
48
|
+
|
|
49
|
+
```gitignore
|
|
50
|
+
# SigMap — local index, generated context, and configuration.
|
|
51
|
+
/.context/
|
|
52
|
+
/.contextignore
|
|
53
|
+
/.repomixignore
|
|
54
|
+
/gen-context.config.json
|
|
55
|
+
/.github/copilot-instructions.md
|
|
56
|
+
/.github/openai-context.md
|
|
57
|
+
/.github/gemini-context.md
|
|
58
|
+
/.github/context-*.md
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
If a generated context file is already tracked, remove it from the index with
|
|
62
|
+
`git rm --cached` while keeping the local file. Do not remove source files or
|
|
63
|
+
hand-authored instructions.
|
|
64
|
+
|
|
65
|
+
## Quiet-by-default instruction
|
|
66
|
+
|
|
67
|
+
Ensure `.github/copilot-instructions.md` contains this instruction before the
|
|
68
|
+
generated SigMap section. Add it only once, and preserve it across future
|
|
69
|
+
regeneration:
|
|
70
|
+
|
|
71
|
+
```md
|
|
72
|
+
## SigMap usage
|
|
73
|
+
|
|
74
|
+
Do not mention SigMap, its index, context, MCP tools, or SigMap workflow in
|
|
75
|
+
normal daily responses. Use it silently when useful. Only output SigMap
|
|
76
|
+
details when the user actively runs a `sigmap` command or directly refers to
|
|
77
|
+
SigMap.
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
If the file is regenerated, reinsert the instruction before the
|
|
81
|
+
`## Auto-generated signatures` marker if needed. This instruction applies to
|
|
82
|
+
agent output, not to command output when a user explicitly runs SigMap.
|
|
83
|
+
|
|
84
|
+
## Validation
|
|
85
|
+
|
|
86
|
+
Run:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
sigmap --version
|
|
90
|
+
opencode mcp list
|
|
91
|
+
sigmap doctor --json
|
|
92
|
+
git check-ignore -v .context/sig-index.json .github/copilot-instructions.md
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The MCP server must report `connected`. `sigmap doctor` may warn about index
|
|
96
|
+
coverage or freshness; report those warnings rather than claiming a clean
|
|
97
|
+
index. Tell the user to restart OpenCode after changing its configuration.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: one-shot
|
|
3
|
+
description: Fast, single-pass implementation mode. Use when the user says "one-shot", "one shot, go", "prioritize speed", or asks to skip planning, delegation, and broad testing in favor of immediate development.
|
|
4
|
+
metadata:
|
|
5
|
+
author: Daniel Fosco
|
|
6
|
+
version: "2026.8.21"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# One Shot
|
|
10
|
+
|
|
11
|
+
> Triggered by: "one-shot", "one shot, go", "prioritize speed over correctness", "development over testing", "no sub-agents"
|
|
12
|
+
|
|
13
|
+
Execute the requested change immediately in one focused pass. Optimize for delivery speed and working implementation rather than exhaustive investigation, review, or test coverage.
|
|
14
|
+
|
|
15
|
+
## Operating mode
|
|
16
|
+
|
|
17
|
+
1. **Act immediately.** Do not present a plan, create tracking artifacts, or ask for confirmation when a reasonable implementation choice exists.
|
|
18
|
+
2. **Work directly.** Do not launch sub-agents, factories, or delegated reviews. Use direct repository and editing tools only.
|
|
19
|
+
3. **Explore narrowly.** Read only the files and nearby conventions needed to make the change safely. Avoid broad architecture surveys and speculative searches.
|
|
20
|
+
4. **Implement once.** Make one coherent, surgical edit that addresses the full request. Do not add unrelated refactors, abstractions, documentation, or tests.
|
|
21
|
+
5. **Validate minimally.** Prefer the fastest targeted check that can catch syntax, type, build, or behavior regressions in the changed surface. Do not run broad test suites unless the change is high-risk or the targeted check fails.
|
|
22
|
+
6. **Finish concisely.** Report the outcome and any material limitation. Do not add a retrospective, optional follow-ups, or an offer to continue.
|
|
23
|
+
|
|
24
|
+
## Priority order
|
|
25
|
+
|
|
26
|
+
When tradeoffs are necessary, use this order:
|
|
27
|
+
|
|
28
|
+
1. User intent and safety constraints
|
|
29
|
+
2. A working end-to-end implementation
|
|
30
|
+
3. Speed and minimal scope
|
|
31
|
+
4. Existing codebase conventions
|
|
32
|
+
5. Targeted validation
|
|
33
|
+
6. Additional tests, polish, and documentation
|
|
34
|
+
|
|
35
|
+
## Guardrails
|
|
36
|
+
|
|
37
|
+
- "One shot" removes ceremony, not responsibility. Never bypass security, privacy, or destructive-action safeguards.
|
|
38
|
+
- Do not knowingly ship broken code. If the direct approach fails, fix the failure rather than stopping at a partial result.
|
|
39
|
+
- Do not silently guess when ambiguity could cause irreversible harm or substantial wasted work; ask only in that case.
|
|
40
|
+
- Preserve unrelated user changes in a dirty worktree.
|
|
41
|
+
- Do not claim success unless the requested outcome is present and the minimal relevant check passes.
|
|
42
|
+
|
|
43
|
+
## Default interpretation
|
|
44
|
+
|
|
45
|
+
Treat this request:
|
|
46
|
+
|
|
47
|
+
> Prioritize speed over correctness, development over testing. No sub-agents. One shot, GO.
|
|
48
|
+
|
|
49
|
+
as:
|
|
50
|
+
|
|
51
|
+
> Implement now, directly and in one focused pass. Favor a complete practical change over exhaustive analysis and test coverage. Use no delegation, avoid ceremony and unrelated work, run only the smallest meaningful validation, and preserve mandatory safety and repository constraints.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release
|
|
3
|
+
description: Creates a versioned release using the current repository's native versioning, tagging, validation, and publishing workflow.
|
|
4
|
+
metadata:
|
|
5
|
+
author: Daniel Fosco
|
|
6
|
+
version: "2026.8.30"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Release Skill
|
|
10
|
+
|
|
11
|
+
> Triggered by: "release", "cut a release", "publish a release", "release a new version", "ship a release", "do a release"
|
|
12
|
+
>
|
|
13
|
+
> This skill is always invoked manually. Other skills must not trigger a release automatically.
|
|
14
|
+
|
|
15
|
+
## What This Does
|
|
16
|
+
|
|
17
|
+
Orchestrates a release from repository evidence. It does not assume npm, Changesets, fixed package versions, a tag prefix, a workflow filename, or a publishing provider.
|
|
18
|
+
|
|
19
|
+
## How to Execute
|
|
20
|
+
|
|
21
|
+
### 1. Establish the release contract
|
|
22
|
+
|
|
23
|
+
Read repository instructions and release-related files before changing anything:
|
|
24
|
+
|
|
25
|
+
- `AGENTS.md`, `CONTRIBUTING.md`, release documentation, and package manifests;
|
|
26
|
+
- versioning configuration such as `.changeset/config.json`, release-please, semantic-release, Cargo, Go, Python, or other ecosystem files;
|
|
27
|
+
- package-manager lockfiles and release scripts;
|
|
28
|
+
- CI workflows that publish artifacts or create hosted releases;
|
|
29
|
+
- existing changelogs and recent release commits.
|
|
30
|
+
|
|
31
|
+
Inspect current state:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
git status --short
|
|
35
|
+
git branch --show-current
|
|
36
|
+
git remote -v
|
|
37
|
+
git tag --list --sort=-version:refname
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Do not release from a dirty tree unless the documented workflow intentionally consumes those exact changes and the user confirms them. Do not assume releases happen from `main` or from a feature branch; enforce the repository's policy.
|
|
41
|
+
|
|
42
|
+
### 2. Determine scope and previous release
|
|
43
|
+
|
|
44
|
+
Identify the package or release unit, its tag family, and the latest reachable release tag. In a monorepo, determine whether packages are independently versioned, linked, or fixed from configuration rather than package counts or naming.
|
|
45
|
+
|
|
46
|
+
Use the relevant tag as the start of the release range and verify it:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
git rev-parse --verify '<last-tag>^{commit}'
|
|
50
|
+
git --no-pager log '<last-tag>'..HEAD --oneline --no-merges
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Handle a first release explicitly when no prior tag exists.
|
|
54
|
+
|
|
55
|
+
### 3. Propose the release
|
|
56
|
+
|
|
57
|
+
Derive a suggested semantic bump from actual compatibility impact:
|
|
58
|
+
|
|
59
|
+
- `major`: breaking public behavior or API;
|
|
60
|
+
- `minor`: backward-compatible user-facing functionality;
|
|
61
|
+
- `patch`: backward-compatible fixes;
|
|
62
|
+
- use the repository's scheme when it is not semantic versioning.
|
|
63
|
+
|
|
64
|
+
Ask the user to confirm the release unit, target version or bump, channel, and generated summary. Show excluded commits and any ambiguity. Do not treat conventional-commit prefixes as proof of compatibility.
|
|
65
|
+
|
|
66
|
+
### 4. Run the native versioning workflow
|
|
67
|
+
|
|
68
|
+
Prefer documented repository scripts. If the repository uses Changesets:
|
|
69
|
+
|
|
70
|
+
1. Create a changeset listing every affected package required by `.changeset/config.json`.
|
|
71
|
+
2. Enter prerelease mode only for a requested prerelease channel.
|
|
72
|
+
3. Run the repository's version command, or the package-manager equivalent of `changeset version` when no wrapper exists.
|
|
73
|
+
4. Read generated manifests and changelogs to obtain the resulting versions.
|
|
74
|
+
|
|
75
|
+
For other release systems, use their checked-in configuration and documented commands. Never substitute a familiar tool merely because the repository lacks one.
|
|
76
|
+
|
|
77
|
+
### 5. Review and validate
|
|
78
|
+
|
|
79
|
+
Inspect the complete release diff. Confirm that versions, lockfiles, changelogs, generated artifacts, and package relationships changed as intended. Run the repository's required release checks, tests, and builds.
|
|
80
|
+
|
|
81
|
+
Stop on unexpected package bumps, missing changelog entries, test failures, or generated files unrelated to the release. Do not discard pre-existing changes.
|
|
82
|
+
|
|
83
|
+
### 6. Confirm irreversible actions
|
|
84
|
+
|
|
85
|
+
Before committing, tagging, pushing, publishing, or dispatching CI, show the exact planned commands and ask for confirmation unless the user's request already explicitly authorized those actions.
|
|
86
|
+
|
|
87
|
+
Use the repository's release commit convention. Create tags with its established command or tag format. Verify every tag points at the intended commit before pushing.
|
|
88
|
+
|
|
89
|
+
Push a branch and tags separately when CI depends on tag events. Trigger a workflow manually only when repository documentation requires it; discover the workflow name and inputs rather than guessing them.
|
|
90
|
+
|
|
91
|
+
### 7. Verify publication
|
|
92
|
+
|
|
93
|
+
Verify each expected artifact through the relevant registry, CI system, and hosted release provider. Compare the published version and release notes with the local release commit. Report pending CI as pending, not successful.
|
|
94
|
+
|
|
95
|
+
If generated changelog text contains inappropriate boilerplate or contributor attribution, preserve the repository's policy and correct the source configuration where practical rather than hard-coding an author's identity.
|
|
96
|
+
|
|
97
|
+
### 8. Report
|
|
98
|
+
|
|
99
|
+
Report:
|
|
100
|
+
|
|
101
|
+
- release unit and version;
|
|
102
|
+
- release commit and tags;
|
|
103
|
+
- validations run and their outcomes;
|
|
104
|
+
- pushed refs and triggered workflows;
|
|
105
|
+
- publication URLs or pending jobs;
|
|
106
|
+
- any manual follow-up.
|
|
107
|
+
|
|
108
|
+
## Failure Recovery
|
|
109
|
+
|
|
110
|
+
Inspect state before retrying. A failed release may already have a version commit, local tag, remote tag, registry artifact, or running workflow. Resume with repository-provided recovery scripts when available. Never recreate, move, or delete a published tag without explicit user approval and a documented recovery plan.
|
|
111
|
+
|
|
112
|
+
## Rules
|
|
113
|
+
|
|
114
|
+
1. Never invoke this skill without an explicit release request.
|
|
115
|
+
2. Never infer package scope, fixed versioning, tag format, changelog paths, or CI workflow names from this skill.
|
|
116
|
+
3. Get confirmation for release scope and version before versioning.
|
|
117
|
+
4. Get confirmation before irreversible remote actions unless already explicitly authorized.
|
|
118
|
+
5. Treat generated release notes as artifacts to review, not unquestioned source material.
|
|
119
|
+
6. Never report success until the expected remote artifacts are verified.
|
|
120
|
+
|
|
121
|
+
## Relationship to Other Skills
|
|
122
|
+
|
|
123
|
+
| Skill | Relationship |
|
|
124
|
+
|-------|-------------|
|
|
125
|
+
| `changeset` | Handles low-level Changesets operations when that tool is configured. |
|
|
126
|
+
| `changelog` | Produces or curates release notes using repository conventions. |
|
|
127
|
+
| `ship` | Delivers code for review; it must not trigger a release automatically. |
|
|
128
|
+
| `worktree` | Provides isolation when the repository's release policy requires it. |
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: shadow-clone
|
|
3
|
+
description: Analyzes a source repository and generates planning documents for re-implementing it in any language or stack. Use when asked to shadow clone, port, or replicate a repo.
|
|
4
|
+
metadata:
|
|
5
|
+
author: Daniel Fosco
|
|
6
|
+
version: "2026.8.25"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Shadow Clone
|
|
10
|
+
|
|
11
|
+
Shadow Clone analyzes a source repository and generates planning documents that enable a complete (or partial) re-implementation — in any language, on any stack.
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
Use this skill when asked to "shadow clone", "clone the architecture of", "re-implement", "port", or "replicate" a repository or a specific aspect of one.
|
|
16
|
+
|
|
17
|
+
## Inputs
|
|
18
|
+
|
|
19
|
+
| Input | Required | Description |
|
|
20
|
+
|-------|----------|-------------|
|
|
21
|
+
| **Source** | Yes | One of: a GitHub URL, a local directory path, or pasted README / documentation content. |
|
|
22
|
+
| **Focus prompt** | No | Natural-language direction on *what* to clone. E.g. "just the UI component library", "only the API layer", "the auth system and data models". When omitted, the entire repo is in scope. |
|
|
23
|
+
| **Target language / stack** | No | If the user specifies a target language or framework, tailor technical plans to that stack. Otherwise keep plans language-agnostic. |
|
|
24
|
+
| **Output folder** | No | Explicit directory where documents should be saved. When omitted, the skill auto-detects (see Output Location below). |
|
|
25
|
+
|
|
26
|
+
## Outputs
|
|
27
|
+
|
|
28
|
+
Shadow Clone produces **two kinds** of planning documents:
|
|
29
|
+
|
|
30
|
+
1. **Conceptual Plan** (`shadow-clone-concept.md`) — one document.
|
|
31
|
+
2. **Technical Plans** (`shadow-clone-tech-*.md`) — one or more documents, one per major module or domain area.
|
|
32
|
+
|
|
33
|
+
These documents should be detailed enough that a developer (or an AI agent) can re-implement the system without access to the original source code.
|
|
34
|
+
|
|
35
|
+
### Output Location
|
|
36
|
+
|
|
37
|
+
Documents are always saved as Markdown files to a subfolder named after the source project (e.g. `my-project/`). The parent folder is determined by the following priority:
|
|
38
|
+
|
|
39
|
+
1. **User-specified folder** — if the user explicitly requests a location, use it exactly.
|
|
40
|
+
2. **`.github/plans/{project}/`** — if a `.github` directory exists in the current working directory.
|
|
41
|
+
3. **`plans/{project}/`** — if a `plans` or `plan` directory exists in the current working directory.
|
|
42
|
+
4. **`{project}/`** — fallback: create the subfolder at the repository root.
|
|
43
|
+
|
|
44
|
+
Where `{project}` is the source project's directory or repository name (e.g. `gh-alerts-ui`).
|
|
45
|
+
|
|
46
|
+
Before writing documents, check which parent folder applies (in order) and create the `{project}` subfolder if it doesn't exist.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Procedure
|
|
51
|
+
|
|
52
|
+
### Phase 1 — Discovery
|
|
53
|
+
|
|
54
|
+
Goal: build a mental model of the source repo's scope, structure, and stack.
|
|
55
|
+
|
|
56
|
+
**If the source is a local directory:**
|
|
57
|
+
|
|
58
|
+
1. Run the repo scanner to get a structural overview:
|
|
59
|
+
```bash
|
|
60
|
+
node .github/skills/shadow-clone/scan-repo.mjs <directory>
|
|
61
|
+
```
|
|
62
|
+
If the user provided a focus area, use the `--focus` flag:
|
|
63
|
+
```bash
|
|
64
|
+
node .github/skills/shadow-clone/scan-repo.mjs <directory> --focus "src/components/**"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
2. Run the signature extractor to map the public API surface:
|
|
68
|
+
```bash
|
|
69
|
+
node .github/skills/shadow-clone/extract-signatures.mjs <directory>
|
|
70
|
+
```
|
|
71
|
+
Optionally filter by extension:
|
|
72
|
+
```bash
|
|
73
|
+
node .github/skills/shadow-clone/extract-signatures.mjs <directory> --ext .ts,.tsx
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
3. Read the README and any key manifest files identified by the scanner (package.json, Cargo.toml, go.mod, etc).
|
|
77
|
+
|
|
78
|
+
**If the source is a GitHub URL:**
|
|
79
|
+
|
|
80
|
+
1. Use GitHub MCP tools (`get_file_contents`) to fetch the README.
|
|
81
|
+
2. Use `get_file_contents` on the root directory to see the file tree.
|
|
82
|
+
3. Fetch key manifest files to understand dependencies and scripts.
|
|
83
|
+
4. Fetch source files as needed for deeper analysis (prioritize entry points and public API).
|
|
84
|
+
|
|
85
|
+
**If the source is pasted README / docs:**
|
|
86
|
+
|
|
87
|
+
1. Parse the provided content directly.
|
|
88
|
+
2. If a URL is discoverable in the content, optionally fetch additional context.
|
|
89
|
+
3. Work with what's available — the plans will note gaps and assumptions.
|
|
90
|
+
|
|
91
|
+
### Phase 2 — Deep Analysis
|
|
92
|
+
|
|
93
|
+
Goal: understand architecture, patterns, data flow, and key implementation details.
|
|
94
|
+
|
|
95
|
+
Using the discovery output:
|
|
96
|
+
|
|
97
|
+
1. **Identify architecture style** — monolith, microservices, serverless, CLI tool, library, etc.
|
|
98
|
+
2. **Map the module graph** — which modules depend on which, what are the boundaries.
|
|
99
|
+
3. **Identify core patterns** — state management, routing, data access, error handling, auth, pub/sub, etc.
|
|
100
|
+
4. **Catalog data models** — schemas, types, interfaces, database models.
|
|
101
|
+
5. **Map external interfaces** — APIs (REST, GraphQL, gRPC), webhooks, CLI commands, UI routes.
|
|
102
|
+
6. **Note configuration & environment** — env vars, config files, feature flags.
|
|
103
|
+
|
|
104
|
+
Read source files as needed. Prioritize:
|
|
105
|
+
- Entry points and bootstrapping code
|
|
106
|
+
- Router / controller definitions
|
|
107
|
+
- Data model definitions
|
|
108
|
+
- Core business logic modules
|
|
109
|
+
- Configuration and middleware
|
|
110
|
+
- Key utility / helper modules
|
|
111
|
+
|
|
112
|
+
If the user specified a focus area, concentrate the analysis there but still note enough surrounding context to understand boundaries and dependencies.
|
|
113
|
+
|
|
114
|
+
### Phase 3 — Write Conceptual Plan
|
|
115
|
+
|
|
116
|
+
Determine the output folder (see **Output Location** above) and create `shadow-clone-concept.md` there with the following structure:
|
|
117
|
+
|
|
118
|
+
```markdown
|
|
119
|
+
# Shadow Clone: Conceptual Plan — {Project Name}
|
|
120
|
+
|
|
121
|
+
> Source: {url or path}
|
|
122
|
+
> Focus: {focus prompt or "Full repository"}
|
|
123
|
+
> Generated: {date}
|
|
124
|
+
|
|
125
|
+
## 1. Purpose & Overview
|
|
126
|
+
What this project does, who it's for, what problem it solves.
|
|
127
|
+
|
|
128
|
+
## 2. Architecture Overview
|
|
129
|
+
High-level architecture style, major subsystems, how they connect.
|
|
130
|
+
Include an ASCII diagram if it helps.
|
|
131
|
+
|
|
132
|
+
## 3. Core Concepts & Domain Model
|
|
133
|
+
Key domain entities, their relationships, core vocabulary.
|
|
134
|
+
|
|
135
|
+
## 4. Key Design Decisions
|
|
136
|
+
Important architectural choices and their rationale (inferred from the codebase).
|
|
137
|
+
- Why this state management approach?
|
|
138
|
+
- Why this data access pattern?
|
|
139
|
+
- Why this auth strategy?
|
|
140
|
+
|
|
141
|
+
## 5. Features & Behavior
|
|
142
|
+
User-facing features and behaviors that must be replicated.
|
|
143
|
+
Organized by area / module.
|
|
144
|
+
|
|
145
|
+
## 6. External Interfaces
|
|
146
|
+
- API endpoints (with methods, paths, request/response shapes)
|
|
147
|
+
- CLI commands
|
|
148
|
+
- UI routes / pages
|
|
149
|
+
- Webhooks / events
|
|
150
|
+
- Database schema (if discoverable)
|
|
151
|
+
|
|
152
|
+
## 7. Cross-Cutting Concerns
|
|
153
|
+
Error handling, logging, auth, validation, i18n, accessibility, testing strategy.
|
|
154
|
+
|
|
155
|
+
## 8. Dependencies & Rationale
|
|
156
|
+
Key dependencies, why they're used, and what they'd map to in another stack.
|
|
157
|
+
|
|
158
|
+
## 9. Assumptions & Gaps
|
|
159
|
+
Things that couldn't be determined from the source and need clarification.
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Phase 4 — Write Technical Plans
|
|
163
|
+
|
|
164
|
+
Create one or more `shadow-clone-tech-{area}.md` files in the same output folder. Each covers a specific module, layer, or feature area. The number of technical plans depends on the project's complexity:
|
|
165
|
+
|
|
166
|
+
- Small project / focused clone → 1 technical plan may suffice
|
|
167
|
+
- Medium project → 2–4 technical plans (e.g., `data-model`, `api`, `ui`, `auth`)
|
|
168
|
+
- Large project → as many as needed to cover the scope
|
|
169
|
+
|
|
170
|
+
Each technical plan follows this structure:
|
|
171
|
+
|
|
172
|
+
```markdown
|
|
173
|
+
# Shadow Clone: Technical Plan — {Area Name}
|
|
174
|
+
|
|
175
|
+
> Part of: {Project Name} shadow clone
|
|
176
|
+
> Focus: {what this plan covers}
|
|
177
|
+
|
|
178
|
+
## 1. Module Overview
|
|
179
|
+
What this module does, its responsibility boundaries.
|
|
180
|
+
|
|
181
|
+
## 2. File / Module Structure
|
|
182
|
+
Recommended directory layout and file organization for the re-implementation.
|
|
183
|
+
|
|
184
|
+
## 3. Interfaces & Contracts
|
|
185
|
+
Detailed type definitions, function signatures, API contracts.
|
|
186
|
+
Use the target language if specified, otherwise use TypeScript-style pseudocode.
|
|
187
|
+
|
|
188
|
+
## 4. Data Models
|
|
189
|
+
Schemas, types, and their validation rules.
|
|
190
|
+
|
|
191
|
+
## 5. Core Logic
|
|
192
|
+
Step-by-step description of algorithms, state machines, data transformations.
|
|
193
|
+
Enough detail to implement without guessing.
|
|
194
|
+
|
|
195
|
+
## 6. Integration Points
|
|
196
|
+
How this module connects to other modules. Expected inputs/outputs at boundaries.
|
|
197
|
+
|
|
198
|
+
## 7. Configuration
|
|
199
|
+
Environment variables, config values, feature flags this module uses.
|
|
200
|
+
|
|
201
|
+
## 8. Error Handling
|
|
202
|
+
Expected error cases and how they should be handled.
|
|
203
|
+
|
|
204
|
+
## 9. Testing Strategy
|
|
205
|
+
What to test, key test cases, edge cases to cover.
|
|
206
|
+
|
|
207
|
+
## 10. Implementation Order
|
|
208
|
+
Suggested sequence for building this module, starting from the foundation.
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Phase 5 — Summary
|
|
212
|
+
|
|
213
|
+
After writing all documents, provide a brief summary to the user listing:
|
|
214
|
+
- What documents were created
|
|
215
|
+
- What areas are covered
|
|
216
|
+
- Any notable gaps or assumptions
|
|
217
|
+
- Suggested next steps for implementation
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Guidelines
|
|
222
|
+
|
|
223
|
+
- **Be specific, not vague.** Plans should contain concrete details: actual route paths, actual field names, actual algorithm steps. A developer should be able to implement from the plan without guessing.
|
|
224
|
+
- **Infer rationale.** When you can see *why* a design decision was made, explain it. This helps the re-implementer make equivalent (not necessarily identical) choices in their target stack.
|
|
225
|
+
- **Note alternatives.** When a design choice is stack-specific (e.g., Redux for state management), note what the general pattern is (centralized state store with actions and reducers) so it can be mapped to other ecosystems.
|
|
226
|
+
- **Respect the focus.** If the user asked to clone only the UI layer, don't write detailed technical plans for the backend. Do note the backend interfaces the UI depends on.
|
|
227
|
+
- **Use deterministic tools first.** Run `scan-repo.mjs` and `extract-signatures.mjs` before reading individual files — they give a complete structural picture cheaply.
|
|
228
|
+
- **Keep plans self-contained.** Each technical plan should be readable on its own, with enough context to understand the module without reading other plans (cross-reference where needed).
|