tokrepo agent discovery
via PatrickJS/awesome-cursorrules
Safely discover and gate reusable AI artifacts before building, with local-first discovery and verification controls.
What is tokrepo agent discovery?
This rule enforces a discovery-before-build workflow for reusable artifacts (skills, prompts, MCP configs, scripts) using TokRepo. It prioritizes local discovery, requires explicit opt-in for hosted discovery with redacted task text, and gates all installs through verification and dry-run approval before applying changes.
- Prefer local TokRepo MCP server for discovery; use hosted discovery only with explicit user opt-in and redacted task text
- Surface candidate artifacts with trust_score_v2 and agent_fit scores; ask before reusing or proceeding with low-trust candidates
- Require tokrepo_verify and tokrepo_install_plan calls before any install, with explicit stop if policy denies or permission scope exceeds declared bounds
- Default all lifecycle operations (install, update, uninstall, rollback) to dry_run: true until user explicitly confirms dry_run: false
- Call tokrepo_handoff_plan after producing reusable work and ask before any tokrepo_push; default to private visibility and strip secrets before publishing
Applies to
File patterns this rule matches.
Rule definition (reference)
Source of truth, from the repository.
-
DISCOVER BEFORE BUILD, LOCAL FIRST: Before generating any reusable artifact matched by this rule (a
SKILL.md, a*.prompt.md, a.mcp.json, an MCP tool config, or a reusable script inscripts/), prefer the local TokRepo MCP server. For private or sensitive work, use local discovery or skip discovery. Use hosted TokRepo discovery only after explicit user opt-in, and redact task text before sending it to the hosted service athttps://tokrepo.com/mcp. If MCP is unavailable and hosted use is approved, use the CLI fallbacknpx -y tokrepo@<reviewed-version> agent-check "<redacted task>" --json. If a candidate returns withtrust_score_v2 >= 0.7ANDagent_fit >= 0.7, surface it and ask before reusing it. If candidates exist buttrust_score_v2 < 0.7, surface them and ask before proceeding. -
VERIFY BEFORE INSTALL: Before any install or write to the user environment, you MUST call
tokrepo_verifyandtokrepo_install_plan. Ifpolicy_decision.decision === "deny": STOP. Ifpermission_enveloperequests writes outside the declared scope (global config, secrets, network egress, absolute paths): STOP and confirm with the user explicitly. Recordcontent_hash,install_plan_hash, andtrust_score_v2as evidence. -
DRY-RUN BEFORE APPLY: Lifecycle tools (
tokrepo_codex_install,tokrepo_update,tokrepo_uninstall,tokrepo_rollback) defaultdry_run: true. Keepdry_run: trueuntil the user has surfaced the plan and explicitly confirmeddry_run: falsefor that specific operation in this session. -
HANDOFF AFTER REUSABLE WORK: After producing reusable artifacts (skills, prompts, MCP configs, scripts), call
tokrepo_handoff_planlocally when available, or usenpx -y tokrepo@<reviewed-version> agent-handoff --jsonafter reviewing the package version. It returns a READ-ONLY draft plan that never auto-publishes. Ask the user before anytokrepo_push. -
PRIVATE BY DEFAULT, NEVER PUSH SECRETS:
tokrepo_pushdefaults tovisibility: 0(private). Public publishing requires explicit per-push confirmation. Before any push, strip env tokens, absolute paths, project-specific names, and secret patterns. Iftokrepo_handoff_planflagged a file as sensitive, do not override.
How to install
# One-time per project - bootstraps .cursor/rules/tokrepo.mdc plus a machine-readable
# .tokrepo/agent.json that the MCP server reads on every planning call.
npx -y tokrepo@<reviewed-version> init-agent --target cursor
Resources
- Hosted MCP endpoint (read-only, no auth):
https://tokrepo.com/mcpafter explicit user opt-in and redacted task text - Local MCP server:
npx -y tokrepo-mcp-server@<reviewed-version> - Published tool catalog: 15 tools in
https://tokrepo.com/.well-known/tool-catalog.json - Trust manifest:
https://tokrepo.com/.well-known/tokrepo-trust.json - Default policy pack:
https://tokrepo.com/policy-packs/default-agent-policy.json - Tool catalog:
https://tokrepo.com/.well-known/tool-catalog.json - Public agent funnel (anonymous):
https://tokrepo.com/agent-stats - Source: https://github.com/henu-wang/tokrepo-mcp-server
Related rules
Senior full-stack TypeScript, React, Node.js guidance with clean architecture, testing, and WHY-oriented reasoning.
Quantitative factor research skills for designing, evaluating, and mining alpha factors in equities markets.
Android development with Jetpack Compose, clean architecture, and Material Design 3.
Angular development with Novo Elements UI library using standalone components.
Expert Angular 18 + TypeScript development with Jest, emphasizing clean code and performance.
Manage Kubernetes clusters, add-ons, stacks, and credentials via the Ankra CLI platform.