smithery/yatarousan0227

agent-contracts-tool-use-rag

Implement tool-using or retrieval-style nodes with services, dependency injection, and safe LLM context building.

Installation

$ npx skills add smithery/yatarousan0227 --skill agent-contracts-tool-use-rag

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/yatarousan0227.

npx skills add smithery/yatarousan0227

Browse all from smithery/yatarousan0227

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

More metadata
short-description
Tools/RAG patterns

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,576 B
  • docs SUMMARY.md 149 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

agent-contracts Tool Use / RAG

Use this skill when your nodes call external services (DB, search, HTTP APIs) or do retrieval-style work.

Core Ideas

  • Declare dependencies in NodeContract.services (and requires_llm when needed).
  • Inject dependencies via:

- direct node construction (nodecls(llm=..., myservice=...)), or - dependencyprovider in buildgraphfromregistry(...).

  • Keep LLM routing context small; rely on sanitization and context_builder only when needed.

Workflow

  1. Define service interfaces (thin wrappers) and keep them testable.
  2. Add services=[...] to NodeContract and use those attributes in execute().
  3. Validate services with ContractValidator(known_services=..., strict=True) in CI.
  4. For RAG:

- store small retrieval results in a domain slice (ids + snippets) - avoid storing full documents or large embeddings in state

  1. For routing accuracy:

- use rule triggers for obvious cases - use LLM only among a small candidate set

Guardrails

  • Sanitize long strings and binary-like content before LLM routing (supervisor does this).
  • Avoid leaking secrets into state; treat state as loggable.

References (load only when needed)

  • docs/core_concepts.md (Context Builder / Sanitization)
  • docs/skills/official/agent-contracts-tool-use-rag/references/diandtesting.md