xiaohongshu
xiaohongshu
document-fetcher
Fetch documents from codex knowledge base with cache-first strategy. Delegates to fractary CLI for actual retrieval operations.
Full skill instructions
Your responsibility is to fetch documents by codex:// URI reference, delegating to the cli-helper skill which invokes the fractary codex fetch CLI command.
Architecture (v4.0):
document-fetcher skill
↓ (delegates to)
cli-helper skill
↓ (invokes)
fractary codex fetch <uri>
↓ (uses)
@fractary/codex SDK (CodexClient)
This provides cache-first retrieval, permission checking, and multi-source support via the TypeScript SDK. </CONTEXT>
<CRITICAL_RULES>
Check that reference is a valid codex:// URI:
codex://codex://{org}/{project}/{path}../)If invalid: Return error with format explanation:
{
"status": "failure",
"message": "Invalid URI format",
"expected": "codex://{org}/{project}/{path}",
"example": "codex://fractary/auth-service/docs/oauth.md"
}
STOP
USE SKILL: cli-helper Operation: invoke-cli Parameters:
{
"command": "fetch",
"args": [
"{reference}",
"--bypass-cache" (if bypass_cache == true),
"--ttl", "{ttl}" (if ttl provided)
],
"parse_output": true
}
The cli-helper will:
fractary codex fetch {reference} [--bypass-cache] [--ttl {seconds}] --jsonThe CLI returns JSON like:
{
"status": "success",
"uri": "codex://fractary/auth-service/docs/oauth.md",
"content": "# OAuth Implementation\n...",
"metadata": {
"fromCache": true,
"fetchedAt": "2025-12-14T12:00:00Z",
"expiresAt": "2025-12-21T12:00:00Z",
"contentLength": 12543,
"contentHash": "abc123..."
}
}
IF status == "success":
IF status == "failure":
Return structured response to caller:
Success:
{
"status": "success",
"operation": "fetch",
"uri": "codex://fractary/auth-service/docs/oauth.md",
"content": "...",
"metadata": {
"fromCache": true,
"source": "CLI",
"fetchedAt": "2025-12-14T12:00:00Z",
"expiresAt": "2025-12-21T12:00:00Z",
"contentLength": 12543
}
}
Failure:
{
"status": "failure",
"operation": "fetch",
"uri": "codex://fractary/auth-service/docs/oauth.md",
"error": "Document not found",
"suggested_fixes": [
"Check URI format",
"Verify document exists in repository",
"Check permissions in frontmatter"
]
}
</WORKFLOW>
<COMPLETION_CRITERIA> Operation is complete when:
✅ For successful fetch:
✅ For failed fetch:
✅ In all cases:
{
"status": "success",
"operation": "fetch",
"uri": "codex://fractary/auth-service/docs/oauth.md",
"content": "# OAuth Implementation\n\n...",
"metadata": {
"fromCache": true,
"fetchedAt": "2025-12-14T12:00:00Z",
"expiresAt": "2025-12-21T12:00:00Z",
"contentLength": 12543,
"source": "CLI"
}
}
{
"status": "failure",
"operation": "fetch",
"error": "Invalid URI format",
"provided": "invalid-uri",
"expected": "codex://{org}/{project}/{path}",
"example": "codex://fractary/auth-service/docs/oauth.md"
}
{
"status": "failure",
"operation": "fetch",
"uri": "codex://fractary/missing/file.md",
"error": "Document not found",
"cli_error": {
"message": "Document not found: codex://fractary/missing/file.md",
"suggested_fixes": [
"Verify document exists in repository",
"Check permissions in frontmatter"
]
}
}
{
"status": "failure",
"operation": "fetch",
"error": "CLI not available",
"suggested_fixes": [
"Install globally: npm install -g @fractary/cli",
"Or ensure npx is available"
]
}
</OUTPUTS>
<ERROR_HANDLING>
When URI format is invalid:
When cli-helper reports CLI unavailable:
When CLI returns error:
When CLI reports permission denied:
v3.0 (bash scripts):
document-fetcher
├─ resolve-reference.sh
├─ cache-lookup.sh
├─ github-fetch.sh
└─ cache-store.sh
v4.0 (CLI delegation):
document-fetcher
└─ delegates to cli-helper
└─ invokes: fractary codex fetch
Benefits:
This skill no longer supports:
@codex/ prefix (use codex:// instead)Use CLI migration tools to convert references:
fractary codex check --fix
</DOCUMENTATION>
<NOTES>This skill delegates to:
fractary codex fetch <uri> [--bypass-cache] [--ttl <seconds>] --json
Via the CLI, this skill benefits from:
CodexClient.fetch() - Main fetch logicCacheManager - Cache hit/miss logicStorageManager - Multi-provider support (GitHub, HTTP, S3)PermissionManager - Frontmatter-based permissionsTo test this skill:
# Ensure CLI installed
npm install -g @fractary/cli
# Initialize config
fractary codex init --org fractary
# Test fetch
USE SKILL: document-fetcher
Parameters: {
"reference": "codex://fractary/codex/README.md"
}
If fetch fails:
fractary --version.fractary/codex.yamlfractary codex fetch <uri>fractary codex cache listfractary codex health
</NOTES>xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience