InvestSkill
CLAUDE.md236 starsChanged 2 months agoMITView on GitHub
Validate JSON manifests manually: InvestSkill is a prompt-engineering plugin, not traditional software. There is no application runtime — the "skills" are structured markdown frameworks that guide AI assistants through investment analysis workflows. Each skill lives in two forms simultaneously: These two files must stay in sync. The prompts/ version is what Cursor, Gemini CLI, GitHub Copilot, and ChatGPT users access. Every SKILL.md and every prompts/*.md must close with the standardized Investment Signal section: the box-drawn block (UTF-8 box-drawing characters), followed…
- Pipes a download into a shell
- Deletes or force-pushes
In this repository2 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/invest-skill.mdcCursor rule
The file
We split this CLAUDE.md into the rules it gives an agent
12 rules. About 0 are common, 1 is distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 55
Create plugins/us-stock-analysis/skills/<name>/SKILL.md with frontmatter
- Very specific: line 56
Create prompts/<name>.md — same content, no frontmatter, no platform-specific syntax
- Very specific: line 59
Update .cursor/rules/invest-skill.mdc, .github/copilot-instructions.md, GEMINI.md (table row + example + directory tree)
- Very specific: line 60
Update README.md and platform-specific README-*.md files (framework table row + count)
- Very specific: line 62
Add entry to CHANGELOG.md
- Very specific: line 63
Run npm run pre-release (pre-release-check + validate + npm test) to confirm all tests pass
- Very specific: line 64
Run npm run build:site to confirm the site builds and the new skill lands in the right category
- Very specific: line 74
Run npm run build:site and confirm: All N frameworks shows the new count, skill-<name>.html is generated, and the skill is not stranded …
- Very specific: line 76
Always update both the English and Traditional Chinese (-zh-TW) variants of any site content file you touch.
- Very specific: line 86
When you touch install.sh:
- Distinctive: line 108
All three version fields must match at all times:
- Very specific: line 136
Keep this number consistent across README.md, README-zh-TW.md, site/content/CHOOSE-A-SKILL(-zh-TW).md, site/content/COOKBOOK(-zh-TW).md, …
≈ “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.
Commands
npm test # Run all unit tests (skill/structure + install script)
npm run test:skills # Skill/structure tests only (270+ checks)
npm run test:install # install.sh tests (static checks + sandboxed runs)
npm run validate # Validate prompt file contents and format
npm run pre-release # Full pre-release check: pre-release-check + validate + test
npm run verify # Verify local setup is correct
npm run release:dry-run # Preview release without making changes
npm run integration-tests # Run integration testsValidate JSON manifests manually:
jq empty plugins/us-stock-analysis/.claude-plugin/plugin.json
jq empty .claude-plugin/marketplace.jsonArchitecture
InvestSkill is a prompt-engineering plugin, not traditional software. There is no application runtime — the "skills" are structured markdown frameworks that guide AI assistants through investment analysis workflows.
Skill Distribution Model
Each skill lives in two forms simultaneously:
plugins/us-stock-analysis/skills/<name>/SKILL.md— Claude Code form, includes YAML frontmatter (---\ndescription: ...\n---) and uses slash command syntaxprompts/<name>.md— Universal form, identical content but with frontmatter stripped, AI-agnostic (no slash commands)
These two files must stay in sync. The prompts/ version is what Cursor, Gemini CLI, GitHub Copilot, and ChatGPT users access.
Platform Config Files
| File | Platform |
plugins/us-stock-analysis/.claude-plugin/plugin.json | Claude Code plugin manifest |
.claude-plugin/marketplace.json | Claude marketplace listing |
.cursor/rules/invest-skill.mdc | Cursor IDE auto-loading rules |
.github/copilot-instructions.md | GitHub Copilot auto-loading |
GEMINI.md | Gemini CLI auto-loading |
Signal Block Requirement
Every SKILL.md and every prompts/*.md must close with the standardized Investment Signal section: the box-drawn block (UTF-8 box-drawing characters), followed only by the Score Guide / Confidence / Horizon lines, an optional one-paragraph mapping note, and the **Disclaimer:** line. Nothing else may follow the block. check-skill-contract.js and Test 5/7 validate the block's presence; the closing order is a convention every skill follows.
Adding a New Skill (12-step process)
See ADDING-NEW-SKILLS.md for the full walkthrough. Key steps:
- Create
plugins/us-stock-analysis/skills/<name>/SKILL.mdwith frontmatter - Create
prompts/<name>.md— same content, no frontmatter, no platform-specific syntax - Skills are auto-discovered from the
skills/directory — no changes needed inplugin.json - Bump version in all three:
plugin.json,.claude-plugin/marketplace.json(bothmetadata.versionand the plugin entry), andpackage.json(must match — see Version Consistency Rule) - Update
.cursor/rules/invest-skill.mdc,.github/copilot-instructions.md,GEMINI.md(table row + example + directory tree) - Update
README.mdand platform-specificREADME-*.mdfiles (framework table row + count) - Update the site (both English and Traditional Chinese — see Site Update Rule)
- Add entry to
CHANGELOG.md - Run
npm run pre-release(pre-release-check + validate +npm test) to confirm all tests pass - Run
npm run build:siteto confirm the site builds and the new skill lands in the right category
Site Update Rule
The public site (site/) is generated by site/build/build-site.js and deployed by CI — the _site/ output is gitignored, so you commit source, not built HTML. Whenever a skill is added, renamed, or removed, update the site in the same change:
site/build/build-site.js→SKILL_CATEGORIES— add the skill to the correct category so it appears in the right group onskills.html(an unlisted skill still renders, but falls into a generic "Other" bucket). Keep these categories mirroring the README's framework table.site/content/CHOOSE-A-SKILL.mdandCHOOSE-A-SKILL-zh-TW.md— add a "goal → skill" row so users can discover it (both languages).site/content/COOKBOOK.mdandCOOKBOOK-zh-TW.md— update the framework count and, if the skill warrants it, add a usage recipe (both languages).- Per-skill reference pages (
skill-<name>.html) are auto-generated fromprompts/<name>.md— no manual page needed. - Run
npm run build:siteand confirm:All N frameworksshows the new count,skill-<name>.htmlis generated, and the skill is not stranded under "Other".
Always update both the English and Traditional Chinese (-zh-TW) variants of any site content file you touch.
QA Report Retention Rule
The daily site review (npm run review / .github/workflows/site-review.yml) writes qa/site_review_YYYYMMDD.md. Only the last 5 days are kept — scripts/site-review.js prunes older reports on every run (RETENTION_DAYS), and the workflow stages qa/ with git add -A so those deletions land in the same commit. qa/PROJECT-REVIEW.md is the hand-written qualitative review and is never pruned.
Install Script Rule
install.sh is the one-command curl installer (curl -fsSL .../install.sh | bash -s -- -a <agent>). It is tested by scripts/test-install.js (npm run test:install) and by .github/workflows/install-script.yml.
When you touch install.sh:
- Adding or renaming an agent means four places, or the tests fail: the
AGENTSlist ininstall.sh, its branch in the per-agentcaseblock, its row inlist_agents(), and the matching entry inINSTALL_TARGETSinsite/build/build-site.js(id + advertisedpath). The parity checks inscripts/test-install.jscompare all of these. - Keep it shellcheck-clean at
--severity=warning(shellcheck --severity=warning --shell=bash install.sh) — CI fails otherwise. - Never overwrite a user's file. Existing instruction files are appended to inside the
MARK_BEGIN/MARK_ENDblock, and a second run must leave the tree byte-identical. Both properties are asserted. rm -rfmay only ever target the script's ownmktemp -ddirectory ($TMP). Enforced by both the test suite and the lint job.- The tests run
install.shfor real in a sandbox with acurltest double serving a tarball built from the working tree — no network, but the actual download → extract → copy → wire path executes.KEEP_INSTALL_TEST_DIR=1keeps the sandbox for inspection.
Documented curl commands in README*.md and site/content/COOKBOOK*.md are checked too: the URL must be the raw.githubusercontent.com/yennanliu/InvestSkill/<ref>/install.sh form and every -a AGENT must be a supported agent.
Bring-Your-Own-Data Helpers Rule
InvestSkill has no runtime: the skills fetch nothing. Two optional, zero-dependency Node scripts exist so a user without a tool-enabled assistant can still paste a primary source — scripts/fetch-edgar.js (an EDGAR filing → data/filings/<TICKER>/ as .htm, stripped .txt, and a .json of header fields) and scripts/fetch-fundamentals.js (SEC XBRL companyfacts → data/fixtures/<TICKER>.md, same shape as the ZEPH eval fixture). Shared plumbing is scripts/lib/edgar.js.
- They stay outside the plugin, and
npm testnever runs them against the SEC (they need the network) — only their offline suite below;npm run fetch:edgar/fetch:fundamentalsare the only user-facing wiring. Do not add data fetching to any SKILL.md — the skills carry the recipe (URLs a tool-enabled host can follow) in10k-digest,financial-report-analyst, andfact-check, and the Data & Accuracy page documents it. - Never commit filings or generated real-ticker packs.
data/filings/anddata/fixtures/*(except the fictionalZEPH.md) are ignored via.gitignore; real numbers go stale and PDFs bloat a markdown plugin. - Save text, not PDFs — the skills consume text. No Playwright / headless-browser dependency.
- Honour SEC fair access: an identifying
User-Agent(EDGAR_USER_AGENTenv) and paced requests (edgar.jsenforces the interval). - Tests:
scripts/test-edgar.js(npm run test:edgar, part ofnpm testand thetest.yml/pr-check.yml/validate.ymlworkflows) covers the library in-process and runs both CLIs as subprocesses against the fetch doublescripts/lib/edgar-mock-fetch.js— no network. Add a route to the double when you add an endpoint; keep the synthetic AAPL facts equal to the real FY2025 figures so the pack stays sanity-checkable. When you change what the helpers fetch, also run them once against a real ticker.
Version Consistency Rule
All three version fields must match at all times:
plugins/us-stock-analysis/.claude-plugin/plugin.json→"version".claude-plugin/marketplace.json→"metadata.version"(and the plugin entry'sversion)package.json→"version"
Verify with: jq '.version' plugins/us-stock-analysis/.claude-plugin/plugin.json && jq '.metadata.version' .claude-plugin/marketplace.json && jq '.version' package.json
This is enforced by the consistency checks in npm test.
Release Timing Rule
Choosing the version number and when to cut the release both matter — don't tag prematurely.
Which number to bump (SemVer):
- MINOR (
1.8.x → 1.9.0) — a new skill/framework, or a meaningful new capability. (Addingbear-caseandposition-ladderwere minor bumps.) - PATCH (
1.9.0 → 1.9.1) — fixes, doc/site tweaks, prompt refinements with no new skill. - MAJOR (
1.x → 2.0.0) — breaking changes to skill names, output contracts, or the plugin layout.
When to stamp the date and tag:
- The
## [X.Y.Z] - YYYY-MM-DDheading inCHANGELOG.mdmust carry the actual release date, not the day you started the work. If the ship date is uncertain, keep the changes under## [Unreleased]and let the release step stamp the date when the release is actually cut. - The git tag
vX.Y.Zis created bynpm run release(release-interactive.js), which commits the version bump, tags, and triggers CI. Create the tag at release time — do not tag ahead of merge. Preview first withnpm run release:dry-run. - Feature work lands on a branch → PR → merge to
main; the tag/release is cut frommainonce merged. The manifest version can be bumped in the feature branch (tests require CHANGELOG ↔ manifest version parity), but the tag waits until the release is genuinely happening. - Batch small changes: prefer one clean
1.9.0release over tagging every intermediate commit. Cut the release when the set of changes is coherent and green (npm run pre-releasepasses).
Framework Count Rule
The advertised framework count = number of skills in plugins/us-stock-analysis/skills/ minus output-only tools (report-generator) minus alias/redirect stubs (fundamental-analysis, dcf-valuation, research-bundle). It is currently 30 analysis frameworks (34 skill directories − 1 output tool − 3 aliases). The classification lives in one place — scripts/lib/skill-registry.js (OUTPUT_TOOLS, ALIAS_SKILLS, META_SKILLS) — and is imported by test-skills.js, test-install.js, check-skill-contract.js, and site/build/build-site.js. The alias list is mirrored in install.sh's case block (the install tests check parity).
- Keep this number consistent across
README.md,README-zh-TW.md,site/content/CHOOSE-A-SKILL(-zh-TW).md,site/content/COOKBOOK(-zh-TW).md, andplugin.json's description. site/build/build-site.jsderives it automatically (FRAMEWORK_COUNT) — never hardcode a count there.- Enforced by the consistency checks in
npm test(stale totals like 18/21 will fail):- Test 11 checks the six site-facing
COUNT_DOCSfor "N frameworks" claims. - Test 13 checks the cross-AI configs (
GEMINI.md,.cursor/rules/invest-skill.mdc,.github/copilot-instructions.md) — every prompt must be referenced (a new skill can't be silently omitted from a platform), and every "N frameworks" claim must equal the advertised count. It also checks the COOKBOOK plugin-list skill counts equal the skill-directory count.
- Test 11 checks the six site-facing
Current State
- Version: 1.12.0 (plugin.json = marketplace.json = package.json)
- Skills: 34 directories in
plugins/us-stock-analysis/skills/(auto-discovered) - Advertised frameworks: 30 analysis frameworks (34 −
report-generator− 3 aliases) - Prompts: 34 universal files in
prompts/— generated from SKILL.md byscripts/sync-prompts.js(never hand-edit them;--checkruns innpm test) - Node: ≥18.0.0 required
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.

