Install
$ agentstack add skill-yinjialu-context-harness-init-context ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README — it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming — see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps — measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Init Context
Use this skill to initialize or repair a context-harness installation. The skill can bootstrap the CLI runtime even when only the skill was installed.
Runtime Bootstrap
Before running context-harness, execute the bundled bootstrap script from this skill directory:
runtime_dir="$(bash scripts/bootstrap.sh)"
cd "$runtime_dir"
The script clones or updates the runtime repository at ~/.local/share/context-harness by default, checks out the latest released tag, and runs uv sync.
Overrides:
CONTEXT_HARNESS_RUNTIME_DIR: custom runtime checkout path.CONTEXT_HARNESS_REPO_URL: custom fork URL.CONTEXT_HARNESS_REF: custom branch, tag, or commit.CONTEXT_HARNESS_BOOTSTRAP_SKIP_UPDATE=1: skip fetch/pull.
Workflow
- Run the Runtime Bootstrap steps above. Use the returned path as the
context-harnessrepository root. - Choose the data home:
- Use
CONTEXT_HARNESS_HOMEwhen set. - Use the user's explicit path when provided.
- Otherwise use
~/.context-harness.
- Run all
uv run context-harness ...commands from the runtime repository root:
uv run context-harness --context-home init
init also binds the data home's global-claude.md into agent-level context:
- Claude Code: adds an
@importline to~/.claude/CLAUDE.md(creating that file if absent). - Codex: adds a managed Context Harness block to
~/.codex/AGENTS.md(creating that file if absent) that tells Codex to read the same global context file at the start of new sessions.
This is idempotent and non-destructive — existing CLAUDE.md and AGENTS.md content is preserved, and re-running reports CLAUDE.md: unchanged and AGENTS.md: unchanged. After a fresh link, the user must restart Claude Code or start a new Codex session for the context to load.
- If the user wants automatic backup hooks, run these commands from the same repository root. Supported Code Agents install to user-level config by default. Use
--scope projectto install into the current project, or combine it with--project-rootto target another project:
uv run context-harness --context-home hooks install codex
uv run context-harness --context-home hooks install codex --scope project
uv run context-harness --context-home hooks install codex --scope project --project-root
uv run context-harness --context-home hooks install claude-code
uv run context-harness --context-home hooks install claude-code --scope project
uv run context-harness --context-home hooks install claude-code --scope project --project-root
- Report the data home and hook status.
Do not store user conversations or memory inside the context-harness repository unless the user explicitly chooses that path as the data home.
OKF Layout
init scaffolds an Open Knowledge Format knowledge base: it writes a root index.md and OKF-shaped templates for memory/MEMORY.md (type: Index), memory/user_profile.md (type: user) and global-claude.md (type: Personal Context). It is idempotent — re-running reports index.md: unchanged.
If the user points init at a data home that already holds pre-OKF archives (no frontmatter), upgrade it once with the idempotent migration:
uv run context-harness --context-home migrate-okf --dry-run # preview
uv run context-harness --context-home migrate-okf # apply
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: yinjialu
- Source: yinjialu/context-harness
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.