agentleFS
thoitiettxl-cyberthoitiettxl-cyber/Claw-II/skills/context7-clean/SKILL.md

context7-clean

Skill2 starsChanged 7 months agoMITView on GitHub

Look up technical documents from Context7 using curl native, key taken from environment variable. Used when you need to find libraryId, get docs by query, or browse the docs index llms.txt.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 4 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    no dependency on separate plugin runtime,

    line 15
  2. Very specific:

    Only use shell scripts in scripts/.

    line 16
  3. Distinctive:

    Use skill when the user requests one of the following tasks:

    line 19
  4. Very specific:

    Read the docs index from llms.txt before deep querying.

    line 22
  5. Very specific:

    If the user does not have libraryId, run scripts/ctx7_search.sh first.

    line 53
  6. Very specific:

    Run scripts/ctx7_get_docs.sh <libraryId> <query> to get the content.

    line 55
  7. Very specific:

    If you need to expand the docs range, run scripts/ctx7_explore_index.sh.

    line 56
  8. Distinctive:

    Do not print the full token in log/chat.

    line 96
  9. Very specific:

    Only use HTTPS endpoints context7.com as in reference.

    line 97
  10. Distinctive:

    Check the results, state validation and next steps.

    line 116
  11. Very specific:

    If CONTEXT7_API_KEY or equivalent env is missing: report missing secret but do not echo the value.

    line 119
  12. Very specific:

    If curl returns timeout / TLS / DNS error: retry at least once then report network unavailable and tried endpoint.

    line 120
  13. Very specific:

    If libraryId resolve is ambiguous or the return document is empty: narrow the query and state what part was verified from the actual …

    line 121

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Context7 Clean

This skill standardizes Context7 queries towards minimal + deterministic:

  • no hardcode secrets,
  • no dependency on separate plugin runtime,
  • Only use shell scripts in scripts/.

Activation cues

Use skill when the user requests one of the following tasks:

  1. Find libraryId from the library name (e.g. react, nextjs).
  2. Get docs/context by libraryId + query.
  3. Read the docs index from llms.txt before deep querying.

Prerequisites

  • There is curl in PATH.
  • There is an outbound network to https://context7.com.
  • For auth endpoint: CONTEXT7_API_KEY must be exported from env (recommended source: /data/adb/openclaw/home/.openclaw/secrets.env).

Indexed Reference Map

  • @[SKILL.md#L1-L116] Standard Frontmatter (name, description).
  • @[SKILL.md#L10-L116] Context7 Clean.
  • @[SKILL.md#L17-L116] Activation cues.
  • @[SKILL.md#L23-L116] Prerequisites.
  • @[SKILL.md#L28-L116] Indexed sub-skill references (source map).
  • @[SKILL.md#L53-L116] Standard operating procedure (SOP).
  • @[SKILL.md#L60-L116] Commands.
  • @[SKILL.md#L62-L116] 0) load env key (example).
  • @[SKILL.md#L65-L116] 1) search library.
  • @[SKILL.md#L68-L116] 2) fetch docs by libraryId.
  • @[SKILL.md#L71-L116] 3) inspect index.
  • @[SKILL.md#L75-L116] Examples.
  • @[SKILL.md#L87-L116] Error handling.
  • @[SKILL.md#L95-L116] Security constraints.

Supporting files

  • @[references/API_REFERENCE.md#L1-L51] Reference document/rulebook for technical decisions.
  • @[references/specification.md#L1-L93] Reference document/rulebook for technical decisions.
  • @[scripts/ctx7_explore_index.sh#L1-L13] Execution/automation script for skill.
  • @[scripts/ctx7_get_docs.sh#L1-L33] Execution/automation script for skill.
  • @[scripts/ctx7_search.sh#L1-L32] Execution/automation script for skill.

Standard operating procedure (SOP)

  1. If the user does not have libraryId, run scripts/ctx7_search.sh first.
  2. Select the appropriate libraryId from the search results.
  3. Run scripts/ctx7_get_docs.sh <libraryId> <query> to get the content.
  4. If you need to expand the docs range, run scripts/ctx7_explore_index.sh.
  5. Answer based on real output; If the API fails, report a real error, not a made-up error.

Commands

# 0) load env key (example)
set -a; . /data/adb/openclaw/home/.openclaw/secrets.env; set +a

# 1) search library
scripts/ctx7_search.sh react "hooks"

# 2) fetch docs by libraryId
scripts/ctx7_get_docs.sh /facebook/react "useEffect cleanup"

# 3) inspect index
scripts/ctx7_explore_index.sh

Examples

Input:

  • Task: "Find the latest React hooks docs"

Flow:

  1. scripts/ctx7_search.sh react "hooks"
  2. select libraryId (eg /facebook/react)
  3. scripts/ctx7_get_docs.sh /facebook/react "hooks"

Expected output:

  • JSON (search) or text payload (context), used as evidence for the answer.

Error handling

  • ERROR: CONTEXT7_API_KEY is not set
    => export key from env and run again.
  • curl not found in PATH
    => install/edit PATH before using skill.
  • HTTP non-200 / empty output
    => retry once with simpler query; If it still fails, report unavailable.

Security constraints

  • Absolutely do not commit the key to the skill file.
  • Do not print the full token in log/chat.
  • Only use HTTPS endpoints context7.com as in reference.

Trigger Rules

  • Positive: Triggers when the user request matches context7-clean according to description: Look up technical documents from Context7 using native curl, key taken from environment variable. Used when you need to find libraryId, get docs by query, or browse the docs index llms.txt.
  • Negative: Not enabled for requests outside scope or without the workflow/expertise of this skill.
  • Escalation: If there is an external action/network write or sensitive operation, an approval checkpoint must be added before executing.

Output Contract

  • Deliverable: target tracking result of context7-clean; Specify the artifact/path/steps performed (if any).
  • Validation: reports PASS/FAIL status and main checks have been run.
  • Failure mode: when there is an error, the root cause + proposed fix must be stated.

Scope

  • In-scope: tasks that match the skill description: Look up technical documents from Context7 using native curl, key taken from environment variable. Used when you need to find libraryId, get docs by query, or browse the docs index llms.txt.
  • Out-of-scope: request outside the domain or against system policy.

SOP

  1. Determine whether the request is within the scope of the skill or not.
  2. Execute the skill's main workflow/instructions in a safe order.
  3. Check the results, state validation and next steps.

Error Handling

  • If CONTEXT7_API_KEY or equivalent env is missing: report missing secret but do not echo the value.
  • If curl returns timeout / TLS / DNS error: retry at least once then report network unavailable and tried endpoint.
  • If libraryId resolve is ambiguous or the return document is empty: narrow the query and state what part was verified from the actual response.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.