grimoire-vscode
CLAUDE.md0 starsChanged 4 months agoApache-2.0View on GitHub
Guidance for Claude Code when working in this repository. VS Code extension grimoire (publisher grimoire-rs): a marketplace UI for the grim CLI (OCI-backed package manager for AI artifacts — skills, rules, agents, MCP servers, bundles). Sibling repo: ../grimoire (the Rust CLI). npm is the build runner (no bun). taskfile.yml exists only as a thin wrapper for the swarm/finalize skills (task verify, task checkpoint, task git:merge) — builds stay npm-driven. - npm run check — lint + type-check + build. Run…
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- finalizeSkill
- swarm-executeSkill
- swarm-planSkill
- swarm-reviewSkill
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 56
Commit subjects and bodies through cliff.toml — put the user-facing wording in the commit message, not in the file.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Guidance for Claude Code when working in this repository.
What this is
VS Code extension grimoire (publisher grimoire-rs): a marketplace UI for the
grim CLI (OCI-backed package manager for AI artifacts — skills, rules, agents,
MCP servers, bundles). Sibling repo: ../grimoire (the Rust CLI).
Build & verify
npm is the build runner (no bun). taskfile.yml exists only as a thin wrapper
for the swarm/finalize skills (task verify, task checkpoint, task git:merge)
— builds stay npm-driven.
npm run check— lint + type-check + build. Run after every change.npm test— full suite under @vscode/test-cli with coverage (c8). Linux headless:xvfb-run -a npm test.npm run package— build the .vsix (vsce,--no-dependencies).docs/manual-testing.md— driving the extension against grim's manual rig (../grimoire/test/manual, two real local registries). TwoF5launch configs point at its consumer projects.
Architecture
src/grim.ts— the only place that spawns grim (execFile, no shell, always--format json). Pure argv builders + envelope parsing (errorkey first, then exit codes). grim's JSON interface is frozen/additive — never assume a field exists; nullable means null.src/scopes.ts— scope discovery viagrim context(project = workspace cwd, global =--global). Declared refs parsed from grimoire.toml.src/views/— extension-host side of the webviews.src/webview/— shared protocol + PURE model modules (no vscode, no DOM imports) so they stay unit-testable; the browser entries undersrc/webview/{sidebar,details}/are thin event wiring. Keep logic in model/render, not in main.ts files.- Webview UI renders through lit-html templates — ALWAYS. Never build webview
DOM from concatenated HTML strings. Lists use keyed
repeat(); event wiring stays delegated viadata-actionattributes on root. The host-side inline first-paint skeleton (baked intowebview.htmlbefore the webview process boots) is produced by rendering the SAME templates to a string with@lit-labs/ssr— never a second hand-written HTML copy. src/installer.ts— grim auto-install from GitHub releases via dist-manifest.json (never hardcode archive extensions; tar.xz today, tar.gz planned). Extraction via systemtar -xf.- Webviews: strict CSP (nonce scripts), markdown-it with
html:false. lit-html auto-escapes bindings;unsafeHTMLis reserved for markdown-it output and highlightJson's self-generated esc()-escaped spans — nothing else, ever. String-rendered paths (host HTML shell) escape every dynamic value throughesc(). Add an escaping test for any new render path.
Conventions
- Conventional Commits. Never commit to
main; work on a branch. Never push without being asked. - Never hand-write
CHANGELOG.md. Its content is derived from Conventional Commit subjects and bodies throughcliff.toml— put the user-facing wording in the commit message, not in the file. Regenerate withgit-cliff -o CHANGELOG.mdwhen a refresh is wanted; CI builds the GitHub Release notes from the same config (release.yml,--latest --strip all). A changelog edit in a diff is a bug, not a courtesy. - Tests live in
src/test/; integration tests stub grim with a POSIX shell script (skipped on Windows) — seewriteStubinextension.test.ts. - Match the design mockups (claude.ai/design "Grimoire Skill Marketplace"):
theme tokens only (
--vscode-*), codicons per kind (skill=sparkle, rule=law, agent=agent, mcp=mcp, bundle=package, hook=symbol-event, settings=settings — the mockups' hubot/plug were stand-ins from before the codicon set had the real ones), null metadata renders as "Not provided", empty panels are omitted.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

