agentleFS
tiangong-aitiangong-ai/agent-skills/tiangong-kb-textbook-search/SKILL.md

tiangong-kb-textbook-search

Skill11 starsChanged 3 months agoMITView on GitHub

Search Tiangong knowledge-base textbook sources through the Tiangong AI CLI. Use for textbook-style explanations and reference material only. This skill searches only the textbook source, not course or edu.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill for Tiangong textbook-source retrieval.

    line 8
  2. Very specific:

    When request_file / input_file is provided, the wrapper loads .env from that file's directory by default.

    line 19

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

Tiangong KB Textbook Search

Use this skill for Tiangong textbook-source retrieval. It is intentionally single-source: always search textbook, never all, course, or edu.

Prerequisites

  • The wrapper defaults to the exact reviewed entrypoint npx --yes --package "@tiangong-ai/cli@0.0.62" -- tiangong-ai; users do not need a preinstalled CLI. Set TIANGONG_AI_CLI or TIANGONG_AI_CLI_BIN only to override the CLI entrypoint intentionally.
  • Set TIANGONG_TEXTBOOK_APIKEY or TIANGONG_AI_APIKEY. Credentials are never accepted in wrapper JSON, request files, URLs, or CLI arguments.
  • When request_file / input_file is provided, the wrapper loads .env from that file's directory by default. env_file can point to a different dotenv file. It must be an owner-only regular non-symlink file (chmod 600), and only documented Tiangong variables are loaded. Existing process variables win.
  • Optionally set TIANGONG_AI_API_BASE_URL; the CLI accepts a Supabase project root, /functions/v1, or /rest/v1 and derives Functions URLs.

Search

For normal searches, pass a query:

./scripts/textbook_search.sh '{
  "query": "activated sludge process principles",
  "top_k": 5
}'

The script calls:

npx --yes --package "@tiangong-ai/cli@0.0.62" -- tiangong-ai education search --query <query> --sources textbook --json

For exact edge-function payloads, provide request_file or input_file:

./scripts/textbook_search.sh '{
  "request_file": "./textbook-request.json",
  "dry_run": true
}'

Raw Payload Filters

Wrapper JSON can include inline raw textbook_search fields; the wrapper will forward them through the CLI --input path. The same payload can also be put in request_file / input_file:

{
  "query": "如何减排二氧化碳?",
  "filter": {
    "isbn_number": ["9787030641274"]
  },
  "datefilter": {
    "publication_date": { "gte": 1262304000 }
  },
  "topK": 5,
  "extK": 1
}
  • filter: metadata term filters, shaped as { "field": ["value"] }.
  • datefilter: numeric range filters, shaped as { "field": { "gte"?: number, "lte"?: number } }, for indexed numeric/date metadata fields.
  • topK, extK: raw edge-function names for result count and adjacent chunk expansion.
  • getMeta is not supported by textbook_search.

Input Fields

  • query or input: convenience query text.
  • request_file or input_file: JSON body forwarded unchanged.
  • env_file: optional dotenv file. Without it, request_file / input_file causes the wrapper to load .env from that file's directory.
  • filter, datefilter, topK, extK: optional inline raw payload fields for textbook search.
  • sources: optional compatibility field; only textbook or default is accepted.
  • dry_run: true to return the exact request plan with masked credentials.
  • api_base_url, textbook_url, region, timeout as non-secret routing values.
  • top_k, ext_k: only used in query mode.

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.