← スキル一覧に戻る

smith-prompts
by tianjianjiang
AGENTS.md as dotfiles: Personal coding standards that follow you everywhere, Mr. Anderson.
⭐ 0🍴 0📅 2026年1月10日
SKILL.md
name: smith-prompts description: Prompt engineering standards for AI interactions with cache optimization. Use when writing AI prompts, optimizing context usage, or structuring AGENTS.md files. Covers prompt caching, token efficiency, and progressive disclosure patterns.
Prompt Engineering Standards
- Load if: Writing AI prompts, optimizing context usage
- Prerequisites: @smith-principles/SKILL.md
CRITICAL: Prompt Caching (Primacy Zone)
Cache reduces costs 90%, latency 85%
Structure for caching:
- Static content first (methodology, rules)
- Tool definitions in consistent order
- Project context (AGENTS.md, docs)
- Dynamic content last (recent changes)
Cache breakpoints: Every ~1024 tokens. Prefix must be identical for cache hit.
- Reordering tools between calls
- Injecting dynamic content into static sections
- Modifying cached prefix unnecessarily
- Using Markdown tables (see
@smith-skills/SKILL.md- use bullet lists instead)
AGENTS.md Cache-Friendly Structure
<!-- STATIC - cached -->
<metadata>
Scope, Load if, Prerequisites
</metadata>
<required>
Critical NEVER/ALWAYS rules
</required>
<forbidden>
Anti-patterns
</forbidden>
<!-- CACHE BREAKPOINT (~1024 tokens) -->
<!-- DYNAMIC - not cached -->
<examples>
Code examples that evolve
</examples>
Token Efficiency
Progressive Disclosure
Three-level loading:
- Metadata only (50 tokens)
- Core concepts when triggered (200 tokens)
- Full details when accessed (1000+ tokens)
Sparse Attention
Efficient file reading:
- Grep to find location
- Read with offset/limit for large files
- Read only necessary context (±20 lines)
- Loading full files when targeted reads suffice
- Reading documentation when metadata answers the question
- Repeating user's question in responses
Structured Output
Platform mechanisms:
- OpenAI: JSON Schema with
strict: true(100% compliance) - Anthropic: Tool use with flexible schemas
- Gemini: responseSchema with retry
Schema design:
- Match existing project patterns
- Include descriptions for complex fields
- Define required vs optional fields
- Keep nesting ≤3 levels
- @smith-ctx/SKILL.md - Progressive disclosure, reference-based communication
@smith-xml/SKILL.md- Approved XML tags
ACTION (Recency Zone)
For caching:
- Place static content before dynamic
- Maintain consistent tool order
- Target >80% cache hit rate
For efficiency:
- Use Grep before Read
- Read incrementally (narrow → expand)
- Use file:line references
スコア
総合スコア
45/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
○言語
プログラミング言語が設定されている
0/5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です