Agent skill

Okf Frontmatter

by longsizhuo in longsizhuo/openInvest

Maintain openInvest's docs (docs/wiki chapters + docs/wiki/adr) under Google's Open Knowledge Format (OKF).

MITAuto-check passedDevelopment

Install Okf Frontmatter

skills CLI
$ npx skills add longsizhuo/openInvest --skill okf-frontmatter -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install longsizhuo/openInvest okf-frontmatter --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/longsizhuo/openInvest.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/okf-frontmatter .claude/skills/okf-frontmatter && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
okf-frontmatter
GitHub stars
108
Token cost
~1.5k tokens
SKILL.md length
616 words
Files
8 (incl. scripts, references)
Repo updated
First seen
Licence
MIT

At a glance

Maintain openInvest's docs (docs/wiki chapters + docs/wiki/adr) under Google's Open Knowledge Format (OKF).

  • Phrases — which doc covers X
  • SKILL.md covers Job 1 — maintain docs the OKF…, Job 2 — find the right doc… and References
  • Runs Python and Shell scripts from its folder
  • Find the schema for PortfolioResponse

What it does

Okf Frontmatter is an agent skill from longsizhuo/openInvest. Maintain openInvest's docs (docs/wiki chapters + docs/wiki/adr) under Google's Open Knowledge Format (OKF). Two jobs. (1) Teach agents to maintain docs the OKF way — every doc carries a small YAML frontmatter block as the single source of truth (type, title, tags, intent, schemasource, documents); schema details link to the authoritative code instead of being copied into prose; no more hand-maintained thousand-line markdown. (2) Look docs up fast — grep the literal term FIRST; only when grep is ambiguous (hits…

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts and reference files (for example `CHANGELOG.md`, `README.md` and `references/conventions.md`).

It sits in Development, covering Architecture decision records, Linting and formatting and On-page SEO. It works with Python. The repository describes itself as: Research-grade investment decision engine for AI agents: isolated multi-agent committee, auditable verdicts, backtests with lookahead protection, published negative results. The licence is MIT.

When your agent uses it

  • Phrases — which doc covers X
  • Find the schema for PortfolioResponse
  • Where is GET /api/holdings documented
  • Docs for verdict.riskprofile

Example prompts

  • “s docs (docs/wiki chapters + docs/wiki/adr) under Google”
  • “s schemasource to the real code. Trigger phrases —”
  • “find the schema for PortfolioResponse”
  • “/okf-frontmatter”

Requirements

  • Python 3
  • A Bash shell

What it can do on your machine

Read from SKILL.md and the folder at commit 220abd2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python and Shell), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Okf Frontmatter loads about 1.5k tokens when it runs, and up to ~3.7k if it reads all its reference files. Until then it costs about 260 tokens; SKILL.md has 616 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~260
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from longsizhuo/openInvest at commit 220abd2, republished under its MIT licence (© longsizhuo). 616 words, ~1,538 tokens.

Download SKILL.mdSave it as .claude/skills/okf-frontmatter/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
okf-frontmatter
description
Maintain openInvest's docs (docs/wiki chapters + docs/wiki/adr) under Google's Open Knowledge Format (OKF). Two jobs. (1) Teach agents to maintain docs the OKF way — every doc carries a small YAML frontmatter block as the single source of truth (type, title, tags, intent, schema_source, documents); schema details link to the authoritative code instead of being copied into prose; no more hand-maintained thousand-line markdown. (2) Look docs up fast — grep the literal term FIRST; only when grep is ambiguous (hits scattered across files / synonym mismatch / zero hits) run find_docs.py to rank the owning doc by frontmatter intent, or resolve a doc's schema_source to the real code. Trigger phrases — "which doc covers X", "find the schema for PortfolioResponse", "where is GET /api/holdings documented", "docs for verdict.risk_profile", "add OKF frontmatter to this doc", "lint the wiki", "scaffold a new ADR/chapter". Run: scripts/run.sh find|schema|index|lint|new (or python3 scripts/find_docs.py --repo <path> ...).
version
0.3.0

okf-frontmatter

OpenInvest's docs live in docs/wiki/ (numbered chapters) and docs/wiki/adr/ (decision records). Under OKF each doc starts with a YAML frontmatter block that is the single source of truth about that doc. Tooling reads the frontmatter; humans read the prose. The goal: stop maintaining huge prose docs that duplicate what the code already says — link to the code instead, and let find_docs.py do navigation.

Point the script at a repo with --repo <path>, or just run it from inside that repo (it auto-detects the nearest ancestor containing docs/wiki/, else uses the working dir). It is read-only except for docs you explicitly edit. The conventions below use openInvest as the worked example, but the mechanics (find / schema / lint) work on any repo whose markdown carries OKF frontmatter.


Job 1 — maintain docs the OKF way

The rule of thumb: frontmatter is structured truth; prose is explanation. Anything that is a schema (a Pydantic model, a dataclass, a config key, an endpoint contract) lives in code — the doc points to it via schema_source / documents, it does not re-type it. When the code changes, lint tells you which doc's pointer went stale. Don't grow a doc past a few screens of "why / how it fits together"; if you're copying field tables out of code, stop and add a schema_source pointer instead.

Frontmatter schema

Common to every doc:

fieldrequiredmeaning
type✅wiki-chapter | adr | index | reference | report | readme
titlerec.human title (usually the H1)
tagsopt.[api, rest, ...] — coarse categories
intentopt.one short phrase the lookup ranks on, e.g. API Contract, 决策参数, 部署
schema_sourceopt.list of relpath:Symbol pointers to the authoritative code, e.g. connectors/web_api/models.py:PortfolioResponse
documentsopt.{endpoints: [GET /api/x], config_keys: [a.b], symbols: [Foo]} — concrete things this doc covers

ADR-only (lifecycle):

fieldmeaning
statusproposed | accepted | superseded (normalizes the old **状态** line)
datedecision date
supersedes / superseded_byADR ids, e.g. [010]

Relationships between docs stay as ordinary markdown links in the body (that's the OKF knowledge graph). supersedes/superseded_by are typed mirrors lint cross-checks.

Adding / changing a doc
  • Scaffold: run.sh new <type> <name> prints a frontmatter skeleton to stdout — paste it at the top of the new file, fill it in.
  • Fill schema_source/documents from the code the doc describes (grep connectors/web_api/models.py, core/schemas.py, core/config/).
  • Run run.sh lint before committing — fix any error (broken link / dangling pointer / missing type).

See references/conventions.md for the full schema + the "no thousand-line prose" rule, and references/okf-spec.md for what OKF is.


Show full SKILL.md (216 more words)Show less

Job 2 — find the right doc fast (grep first, script as fallback)

find_docs.py is not the first move. grep is. The script only pays off when grep can't tell you which doc is authoritative.

1. grep the literal term first (ripgrep) — zero script overhead.
2. grep is decisive? → read that doc, done.
   "decisive" = the term hits one file, or hits a heading / frontmatter (that doc owns it).
3. grep is ambiguous? → run.sh find <query>
   "ambiguous" = hits scattered across ≥3 files / only in prose / 0 hits (synonym mismatch).

Why: on a clean literal hit, grep is already optimal and the script just adds a call. The win comes from not calling the script on easy queries — so don't run both in parallel. The script's real value is matching intent, not strings: it ranks the doc whose frontmatter owns the symbol/endpoint/config-key first, even when the literal keyword is buried. Full decision tree + the benchmark behind it: references/lookup-strategy.md.

Commands
commanduse
run.sh find <query>symbol (PortfolioResponse), endpoint (GET /api/holdings), config key (verdict.risk_profile), intent/tag, or keyword → ranked owning docs (JSON, strongest match first)
run.sh schema <doc>resolve a doc's schema_source and print the real code definitions — read the authoritative schema without opening the prose
run.sh index [--cache]dump the whole frontmatter index as JSON (--cache writes docs/.okf-index.json)
run.sh lint [--ci]OKF compliance + drift; --ci exits non-zero only on errors (un-migrated docs are info, never a failure)
run.sh new <type> <name>print a frontmatter skeleton

References

filewhen to read
references/okf-spec.mdwhat the Open Knowledge Format is (the 1-page version)
references/conventions.mdthis repo's frontmatter schema + maintenance rules
references/lookup-strategy.mdthe grep-first / script-fallback decision tree + benchmark

© longsizhuo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts, references) in skills/okf-frontmatter of longsizhuo/openInvest.

  • SKILL.md
  • CHANGELOG.md
  • README.md
  • references/conventions.md
  • references/lookup-strategy.md
  • references/okf-spec.md
  • scripts/find_docs.py
  • scripts/run.sh

Open the folder on GitHubat commit 220abd2

Compare with similar skills

Okf Frontmatter next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Okf Frontmatter compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Okf Frontmatter this skilllongsizhuo/openInvest108—~1.5kAutomated safety check: PassMIT
Adk Stylegoogle/adk-python22k—~769Automated safety check: PassApache-2.0
Minimizing Ty Ecosystem Changesastral-sh/ruff50k—~4.6kAutomated safety check: PassMIT
Summarise Ecosystem Resultsastral-sh/ruff50k—~2.2kAutomated safety check: PassMIT
Kedro Babysitkedro-org/kedro11k—~4kAutomated safety check: PassCustom licence
Saleor Commit Workflowsaleor/saleor23k—~575Automated safety check: PassBSD-3-Clause

Similar skills

  • Adk Style

    google/adk-python

    Official

    Python style and codebase conventions for ADK (Agent Development Kit): private-by-default file visibility, imports, type hints, Pydantic v2 models, formatting, docstrings, logging, async I/O, file…

    22k GitHub stars~769 tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    A skill your agent uses when a user says "minimize this ty ecosystem change", "reproduce this ecosystem result", "investigate a primer difference", "investigate a mypyprimer difference"…

    50k GitHub stars~4.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    A skill your agent uses when a user says "summarise ecosystem results", "summarize this ty ecosystem report", "what changed in this ecosystem run?", or asks to summarise or summarize ty ecosystem…

    50k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Kedro Babysit

    kedro-org/kedro

    Run Kedro's local lint / format / type-check / tests on changed files (uses the project's pre-commit hooks, ruff, mypy, pytest, lint-imports, detect-secrets, Make targets — in the right venv), or…

    11k GitHub stars~4k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Design Doc Mermaid

    SpillwaveSolutions/design-doc-mermaid

    Create Mermaid diagrams (flowchart, sequence, class, ER, state, C4, architecture) from text or source code.

    176 GitHub starsUsed in 1 repo~5.6k tokens
    DevelopmentAuto-check passed

More from longsizhuo/openInvest

  • Invest Setup

    longsizhuo/openInvest

    First-time openInvest installation and onboarding. An agent skill from longsizhuo/openInvest.

    108 GitHub stars~2.7k tokensUpdated today
    Auto-check: notes
  • Invest

    longsizhuo/openInvest

    openInvest multi-asset AI investment committee — daily use. An agent skill from longsizhuo/openInvest.

    108 GitHub stars~5.9k tokensUpdated today
    Auto-check: notes
  • Invest Backup

    longsizhuo/openInvest

    Back up / restore openInvest's local state — memory/ (holdings, strategy, user profile, committee records, dream logs) + db/ (trade ledger, job run history, market-data cache) + .env (SMTP/API…

    108 GitHub stars~1.2k tokensUpdated today
    Auto-check: notes

Works with

Categories

Questions about Okf Frontmatter

What does Okf Frontmatter do?

Maintain openInvest's docs (docs/wiki chapters + docs/wiki/adr) under Google's Open Knowledge Format (OKF). Okf Frontmatter is an agent skill from longsizhuo/openInvest. Maintain openInvest's docs (docs/wiki chapters + docs/wiki/adr) under Google's Open Knowledge Format (OKF).

When should I use Okf Frontmatter?

Okf Frontmatter fits situations like: phrases — which doc covers X; find the schema for PortfolioResponse; where is GET /api/holdings documented; docs for verdict.riskprofile.

How do I install Okf Frontmatter in Claude Code?

Run `npx skills add longsizhuo/openInvest --skill okf-frontmatter -a claude-code`. Or copy the skill folder (skills/okf-frontmatter in longsizhuo/openInvest) into .claude/skills/okf-frontmatter in your project. Claude Code loads it when a task matches its description.

How do I install Okf Frontmatter in Codex?

Run `npx skills add longsizhuo/openInvest --skill okf-frontmatter -a codex`. Or copy the skill folder (skills/okf-frontmatter in longsizhuo/openInvest) into .agents/skills/okf-frontmatter in your project. Codex loads it when a task matches its description.

Can I use Okf Frontmatter in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add longsizhuo/openInvest --skill okf-frontmatter -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/okf-frontmatter, .gemini/skills/okf-frontmatter, .github/skills/okf-frontmatter and .opencode/skills/okf-frontmatter in your project.

What does Okf Frontmatter need to run?

Going by SKILL.md and its folder, Okf Frontmatter needs Python and a shell for the scripts in its folder. Our summary lists: Python 3; A Bash shell.

Does Okf Frontmatter access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Okf Frontmatter safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Okf Frontmatter use?

Okf Frontmatter is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Okf Frontmatter use?

About 1.5k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.2k tokens, read only when the agent opens those files.

What are the alternatives to Okf Frontmatter?

Skills that share tags, products or a category with Okf Frontmatter: Adk Style (google/adk-python, 22k stars), Minimizing Ty Ecosystem Changes (astral-sh/ruff, 50k stars), Summarise Ecosystem Results (astral-sh/ruff, 50k stars) and Kedro Babysit (kedro-org/kedro, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Okf Frontmatter?

longsizhuo (a GitHub user) maintains it in longsizhuo/openInvest, which has 108 GitHub stars. The repository was last updated on October 11, 2026.

Source: longsizhuo/openInvest on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.