# Tiangong Kb Course Fulltext Fetch

> Fetch full text for a Tiangong KB course document through the Tiangong AI CLI. Use when a task has a course document_id and tags and needs the complete processed text.

- **Type:** Skill
- **Install:** `agentstack add skill-tiangong-ai-agent-skills-tiangong-kb-course-fulltext-fetch`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [tiangong-ai](https://agentstack.voostack.com/s/tiangong-ai)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [tiangong-ai](https://github.com/tiangong-ai)
- **Source:** https://github.com/tiangong-ai/agent-skills/tree/main/tiangong-kb-course-fulltext-fetch

## Install

```sh
agentstack add skill-tiangong-ai-agent-skills-tiangong-kb-course-fulltext-fetch
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Tiangong KB Course Fulltext Fetch

Use this skill when the task has a Tiangong KB course `document_id` and `tags`,
and needs the full processed text for that document.

## Boundary

Always call the Tiangong AI CLI:

```bash
npx @tiangong-ai/cli@0.0.19 kb course fulltext --document-id  --tags 
```

Do not call S3, NAS, Supabase, Pinecone, or OpenSearch directly from the skill.
The CLI owns the S3 path rule, list/get behavior, and AWS SDK credential
handling.

## Prerequisites

- The wrapper defaults to `npx @tiangong-ai/cli@0.0.19`; users do not need a
  preinstalled CLI. Set `TIANGONG_AI_CLI` or `TIANGONG_AI_CLI_BIN` only to
  override the CLI entrypoint.
- AWS credentials must already be available in the environment through the AWS
  SDK default chain, such as `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`,
  `AWS_SESSION_TOKEN`, `AWS_PROFILE`, `AWS_REGION`, or `AWS_DEFAULT_REGION`.
- If credentials live in a dotenv file, pass `env_file`. Loaded dotenv values
  only fill unset environment variables; explicit JSON fields such as `bucket`,
  `prefix`, and `region` are passed as CLI flags and take precedence. Never
  print secret values.

## Fetch Full Text

Pass the course `document_id` and `tags`:

```bash
./scripts/course_fulltext_fetch.sh '{
  "document_id": "000125ed-c4d9-4fe3-9383-281162406d66",
  "tags": "thu_humanities"
}'
```

The wrapper calls:

```bash
npx @tiangong-ai/cli@0.0.19 kb course fulltext --document-id  --tags 
```

To save the full text:

```bash
./scripts/course_fulltext_fetch.sh '{
  "document_id": "000125ed-c4d9-4fe3-9383-281162406d66",
  "tags": "thu_humanities"
}' ./fulltext.txt
```

To return CLI metadata and text as JSON:

```bash
./scripts/course_fulltext_fetch.sh '{
  "document_id": "000125ed-c4d9-4fe3-9383-281162406d66",
  "tags": "thu_humanities",
  "json": true
}'
```

## Input Fields

- `document_id` or `documentId`: required course document id.
- `tags` or `tag`: required course tag, such as `thu_humanities`.
- `output_file`: optional output path. The second wrapper argument takes
  precedence when both are provided.
- `env_file`: optional dotenv file to load before calling the CLI.
- `json`: true to return the CLI JSON payload instead of plain text.
- `bucket`, `prefix`, `region`: optional overrides for the CLI command.

When using the returned text in reader-facing prose, cite source titles or
paths when useful, but do not describe internal S3 paths, AWS credentials, or
retrieval mechanics unless the user asks for implementation details.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [tiangong-ai](https://github.com/tiangong-ai)
- **Source:** [tiangong-ai/agent-skills](https://github.com/tiangong-ai/agent-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-tiangong-ai-agent-skills-tiangong-kb-course-fulltext-fetch
- Seller: https://agentstack.voostack.com/s/tiangong-ai
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
