claude-skills
CLAUDE.md1 starsChanged 3 months agoMITView on GitHub
This is the source of truth for a personal collection of Claude Code configuration — skills, slash commands, methodology docs, and config templates. It is not an application — there is no build, no test runner, no lint, no package manifest. The "artifacts" are Markdown definitions, bundled bash scripts, and plain-JS workflow files. Today the repo holds skills (each a directory under skills/), methodology docs (under docs/), and config templates. Other Claude Code config kept here in future — slash…
- Reads credentials
- Installs packages
In this repository7 other files it gives its agents.
- user-claude-md/CLAUDE.mdCLAUDE.md
- adversarial-reviewSkill
- feature-planningSkill
- hyperdxSkill
- langfuseSkill
- mutation-testSkill
- pr-reviewSkill
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 44
When asked to "update the X skill," clarify whether that means editing the source here, the deployed copy under ~/.claude/skills/, or both.
- Very specific: line 204
Must open with a pure-literal export const meta = {...} block whose phases match the phase() calls in the body.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 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
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What this repo is
This is the source of truth for a personal collection of Claude Code configuration — skills, slash commands, methodology docs, and config templates. It is not an application — there is no build, no test runner, no lint, no package manifest. The "artifacts" are Markdown definitions, bundled bash scripts, and plain-JS workflow files.
Today the repo holds skills (each a directory under skills/), methodology docs
(under docs/), and config templates. Other
Claude Code config kept here in future — slash commands (Markdown files under a
commands/ dir), agents, hooks — follows the same source→deployed model below:
authored here, copied into ~/.claude/ (or a project's .claude/) to take
effect.
Git remote: github.com:LunarCommand/claude-skills.
The one thing to understand first: source vs. deployed
Editing a file here does not change any running skill. Skills only take effect once installed, by either of two routes:
- Clone and copy —
install.shcopies each skill into~/.claude/skills/<name>/(or a project's.claude/skills/<name>/). Because each skill dir carries a.claude-plugin/plugin.json, Claude Code loads it as a skills-directory plugin (<name>@skills-dir), discovered in place. - Plugin marketplace —
/plugin marketplace add LunarCommand/claude-skillsthen/plugin install <name>@lunar-skills. Claude Code copies the plugin into a versioned cache under~/.claude/plugins/cache/.
No SKILL.md may reference its scripts by path — not a repo path, not
~/.claude/skills/..., and not ${CLAUDE_PLUGIN_ROOT}, which resolves on
the marketplace route but passes through literally on the skills-dir route (the
Bash call is then rejected with Error: Contains expansion). Scripts live in
bin/, which Claude Code puts on the Bash tool's PATH, and are referenced by
bare name. That is the only spelling that works on both routes.
So the workflow is: edit here → re-copy to the skills dir → the change is live.
When asked to "update the X skill," clarify whether that means editing the source
here, the deployed copy under ~/.claude/skills/, or both. They drift
independently.
Repository layout
Each top-level directory has one role:
.claude-plugin/marketplace.json— the marketplace catalog (lunar-skills), listing each skill as its own plugin with"source": "./skills/<name>". Adding a skill means adding an entry here too;scripts/validate.shfails if one is missing.skills/— the installable skills, one directory per skill (adversarial-review/,feature-planning/,hyperdx/,langfuse/,pr-review/). Each is aSKILL.md+.claude-plugin/plugin.json+ (usually) abin/dir or a*.workflow.jsengine. Each directory is the plugin root, which is why the manifest sits inside it rather than under a separateplugins/tree.install.shcopies each into~/.claude/skills/.docs/— methodology and process docs, not installed.docs/ai-review/covers how to get high-value review out of AI (the reasoning behind theadversarial-reviewskill).docs/RELEASING.mdis authoritative on how a change actually reaches users — read it before proposing a tag.CHANGELOG.md— grouped by plugin, not by repo, since each ships its own version. Keep theUnreleasedsection current as work lands.project-files/— templates to copy into a consuming project:.agent.env(secrets/config the scripts read) and.claude/settings.json(a permissions allowlist that pre-approves the skill scripts).user-claude-md/CLAUDE.md— the recommended global user-level CLAUDE.md (the plan→implement→test→handoff workflow) the skills and settings are tuned to. Shipped as the exampleinstall.shinstalls; reference, not active in-repo.scripts/validate.sh— the checks (see Testing / validation below). One script, called by both CI and the optional pre-commit hook so they can't drift..github/workflows/validate.yml— runsscripts/validate.shon push and PR..githooks/pre-commit— opt-in local hook (git config core.hooksPath .githooks) running the fast subset.install.sh,LICENSE,README.md— the installer, MIT license, and the public-facing overview of the toolkit.
Skill anatomy
A skill is a directory containing:
SKILL.md— YAML frontmatter (name,description) followed by instructions. Thedescriptionis load-bearing: it is the trigger text that decides when the skill auto-activates, so it enumerates trigger phrases exhaustively and is written in an imperative "Always use this skill when..." style. Match that style when editing..claude-plugin/plugin.json— the plugin manifest.namemust match the directory name (and the SKILL.md frontmattername).versiongates updates: users are only offered a new version when this string changes, so bump it in the same change that touches the skill, including prose-only SKILL.md edits — the Markdown is the artifact.scripts/validate.shfails when a skill changed since the lastv*tag without a bump. Seedocs/RELEASING.md.bin/— bash CLIs that do the actual external work. Claude Code adds this to the Bash tool'sPATH, so the files must stay executable and are invoked by bare name. Do not reintroduce ascripts/dir; it is not onPATH.- optionally
*.workflow.js— a multi-agent engine the skill escalates to. These are handed to the Workflow tool as ascriptPath— a file to read, not a command to run — so they do not belong inbin/and are not onPATH. Resolving them is still abin/job, though:adversarial_review_path.shprints the absolute path of a bundled file within whichever copy of the skill is loaded. Prose ("this skill's base directory") was tried and does not work — with two copies of a skill on disk, the model globs and can pick the stale one.
The bundled-script invariant
Across every skill, the strongest recurring rule is: all external access goes
through the bundled script — never raw curl, gh api, direct REST calls, or
manual env exports. Skills repeat this because the alternatives trigger
permission prompts and bypass the config/routing logic. When a script fails, the
instruction is to fix the script, not work around it. Preserve this framing in
any skill edits.
Its corollary is the bare-name rule: scripts are invoked as hdx_query.sh
..., never by any path. The permission allowlist approves exactly that form
(Bash(hdx_query.sh:*)), so a path-qualified or env-prefixed invocation prompts
even though the script is pre-approved.
Two consequences, both load-bearing when adding a script:
- A rule approves a NAME, not a file. It is a text match on the command
string, and the name resolves through
PATH, which the user controls and the plugin does not. So shipped basenames must be distinctive enough that nothing else plausibly owns them — this is why the pr-review scripts carry apr_review_prefix rather than bare names likepost_replyorresolve_thread. The skill directories are appended to the end ofPATH, after/usr/binand everything else, so a collision is not a coin toss: a same-named executable anywhere earlier wins outright and the skill's copy is never reached, while the permission rule keeps approving the call. A generic basename therefore fails silently and looks like the skill misbehaving.scripts/validate.shfails on a basename shipped by two skills, since bare-name invocation can only ever reach one of them — and on any*.shnamed in the docs that no longer ships, which is how a rename turns into a failing check rather than stale prose. - The settings template covers this repo's skills and nothing else, which is
what makes it safe to suggest at either project or user scope. It was once a
personal project config carrying
defaultMode: auto,Write,Edit,Agent,Bash(make:*)and tooling unrelated to these skills — at user scope that applied to every repo the user opened, including untrusted ones the review skills exist to inspect. Keep it minimal: every entry should trace to a command a shipped skill actually runs, and anything broader belongs in the user's own settings, not in a template they copy.
.agent.env config convention
hdx_query.sh and langfuse_query.sh auto-load .agent.env from the current
project root ($(pwd)/.agent.env). It holds per-project config/secrets and
accepts both KEY: VALUE and KEY=VALUE lines. project-files/.agent.env is
the template. Scripts validate required keys and tell the user what's missing
rather than guessing.
The same rule covers binaries: every script that shells out preflights its
dependencies with require_cmd and exits 127 naming what to install. This is
load-bearing, not politeness — every SKILL.md tells the agent that a failing
script must be fixed, not worked around, so a bare jq: command not found
sends it editing working code instead of reporting a missing package. Keep the
preflight when adding a script, and keep it duplicated per plugin: plugins
cannot reference files outside their own directory, so there is no shared helper
to factor it into.
The scripts
Each script is self-documenting via a header comment and --help/usage output.
Common invocations, run from a consuming project — bare name, no path, because
bin/ is on the Bash tool's PATH:
# HyperDX logs/traces (cloud REST or local ClickHouse-in-Docker)
hdx_query.sh --query "level:err"
hdx_query.sh --local --table traces --query "SpanName:call_model"
# Langfuse (auto-detects legacy v1 vs v4 API from /api/public/health)
langfuse_query.sh apigen # → legacy | v4
# GitHub PR review threads (the pr_review_ prefix is deliberate — see the
# bare-name rule above: a permission rule approves a NAME, so a generic one
# could be satisfied by an unrelated executable earlier on PATH)
pr_review_parse_comments.sh <owner/repo> <pr> # list unresolved
pr_review_parse_comments.sh <owner/repo> <pr> <index> # detail by index
pr_review_post_reply.sh <owner/repo> <pr> <comment_id> "<text>"
pr_review_resolve_thread.sh <thread_node_id>To run one in this repo while developing it, use its real path
(skills/hyperdx/bin/hdx_query.sh) — the source tree is not on PATH.
hdx_query.sh and langfuse_query.sh are large (400 / 700 lines) and carry real
routing logic — the Langfuse script in particular abstracts over two API
generations (legacy ≤ v3 REST vs. v4, where traces/sessions are derived from
observations and reads need explicit fields groups). Read the script header and
skills/langfuse/SKILL.md before touching that routing. The pr-review scripts are thin
gh api wrappers and are invoked one at a time — never chained.
Workflow JS files (*.workflow.js)
skills/adversarial-review/ contains two, run by the Workflow tool (not
node). Hard constraints, stated in their headers and enforced by the runtime:
- Plain JS only — no TypeScript, no filesystem, no
Date.now()/Math.random()/new Date()(they break resume). - Must open with a pure-literal
export const meta = {...}block whosephasesmatch thephase()calls in the body. - They orchestrate many parallel subagents (review lenses → merge → refute-verify
→ severity-rank).
argscarriesscope/context/invariants; several fields (isolate,reviewRef) exist to handle git-worktree isolation safely. - Both engines take
isolate/reviewRef/baseRef. Withoutisolate,spec-accept-review.workflow.jsreviews uncommitted work in the real tree — the highest-risk configuration, since a worktree can only hold committed work — and its read-only mandate is then the only guard. Its risk framing is conditional onISOLATE; keep it that way when editing, and never let the isolated branch claim protections a submodule working tree does not have. - The two engines duplicate four refutation mandates verbatim, because the
Workflow runtime gives a script no imports and no filesystem.
scripts/validate.shasserts they stay byte-identical: the pair drifted twice before the check existed, each time shipping docs that apologised for the difference. Change a mandate in one engine and you must change it in the other. - Both are reachable from
SKILL.mdStep 3b, which picks between them by target (code vs spec/RFC). Adding a third engine means adding it there too. An engine no step routes to still runs when a user names it directly — which is howspec-accept-review.workflow.jswas used for a long time — but it is invisible to anyone who installs the skill fresh and only readsSKILL.md.
Testing / validation
There is no unit-test suite — the artifacts are Markdown contracts and bash
scripts. What exists instead is scripts/validate.sh, which enforces the
mechanical invariants: shell/JS syntax, the Workflow-tool constraints above,
SKILL.md frontmatter (name matching its directory, description present),
plugin and marketplace manifests (valid JSON, names agreeing with directories,
every skill listed, plus claude plugin validate when the CLI is on hand),
config-template JSON validity, that the settings allowlist and the shipped
bin/ scripts name each other exactly, non-portable shell idioms in every shell
artifact — GNU-only tool flags and bash 4 syntax alike, since macOS is stuck on
bash 3.2 (this workstation is Linux, so a find -printf or a mapfile passes
locally; CI runs the suite on macOS too, under the stock bash forced onto PATH,
which is what catches these for real), plugin version
bumps (a skill changed since the last v<number> tag must carry a higher
version, or everyone who installed it is stranded — see docs/RELEASING.md),
repo hygiene (no macOS cruft, personal paths, or credential-shaped strings —
this repo is public), and an end-to-end install.sh run into a temp
CLAUDE_HOME.
Every check here is syntactic. shellcheck, the portability scan, the manifest
and allowlist agreement, bash -n — they test spelling, not meaning, and none of
them can tell you whether a script does what it claims. tr '/' '_' is valid
shell and passes all of them; it is also not injective, which is how a bundled
runner came to restore one file's contents over another and print "all files
restored" with exit 0.
So a green suite is not evidence of correctness. For anything that writes to
the user's tree, read its backup-and-restore path by hand before adopting it —
that was twenty lines here — and run adversarial-review on external code when
it arrives, not after building on it. Reviewing late meant three fixes got built
on a broken foundation, and two of those fixes were themselves blockers.
scripts/validate.sh # everything — what CI runs
scripts/validate.sh --quick # syntactic checks only — see below--quick skips both slow sections — the install integration test and the
mutation-test acceptance suite, which is ~22s of the ~29s full run. That matters
more than it sounds: the acceptance suite is the only check here that runs an
artifact and asserts on behaviour, so --quick leaves nothing but syntax. The
pre-commit hook uses it, so a clean commit hook is not evidence the scripts
work. CI runs the full suite.
Three environment variables loosen it, each a deliberate bypass rather than a
normal setting: SHELLCHECK_SEVERITY=error, SHELLCHECK_OPTIONAL=1, and
SKIP_VERSION_CHECK=1. The version check needs tags, so CI checks out with
fetch-depth: 0; without that it would pass vacuously.
One bash 3.2 hazard is worth knowing because nothing local catches it: a
case statement inside a $( ) command substitution needs a leading ( on
every pattern. bash 3.2 finds the end of a substitution by scanning for the
matching paren, so an unparenthesised pat) closes it early and the script dies
at the ;;. Write case $f in (*.sh) ... ;; esac. bash -n on a modern bash
accepts the unparenthesised form, shellcheck says nothing, and the portability
scan is a regex over idioms rather than a parser — so the CI macOS job is the
only thing that sees it, and it sees it as a syntax error in a file that is
fine everywhere else.
shellcheck blocks at warning severity and the scripts are clean at that level,
so keep them there. SHELLCHECK_SEVERITY=error exists to stage a noisy new
script without turning CI red; it is not the normal setting.
Which shellcheck ran is part of the result. CI pins 0.10.0 on both
runners, installed from the upstream static binary. It used to be apt on Linux
and brew on macOS, which silently meant 0.9.0 on two of the three lint runs
(local included, since 0.9.0 is the newest this distro's apt offers) and 0.10.x
on one — so SC2327/SC2328, which catch a redirection that writes an error
message into the file it is meant to be restoring, fired on the macOS job and
nowhere else, after the commit had landed. validate.sh now prints the version
beside every shellcheck line and warns when it is below what CI pins. If that
warning appears, the local run is a subset of CI's: install the pinned binary to
~/.local/bin rather than trusting a green local run.
A missing shellcheck is a failure, not a warning — a machine that isn't
linting should not report a clean run, which is how unlinted shell once got past
the pre-commit hook and was first seen by CI. Install it
(sudo apt-get install -y shellcheck, matching what CI does) or set
SHELLCHECK_OPTIONAL=1 to skip it on purpose.
Beyond that, validate behavior by running the affected script against a real
instance (or a workflow via the Workflow tool) and checking output — CI cannot
do this, since it has no credentials. For scripts, also confirm the usage/error
paths still fire with missing args or missing .agent.env keys.
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.

