Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

agentic-docsAgent 文档

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

759

周安装

31

GitHub Stars

4

下载量

243
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:agentic-docs(Agent 文档)
来源仓库:https://github.com/petekp/agent-skills
仓库路径:skills/agentic-docs
安装命令:
npx skills add https://github.com/petekp/agent-skills --skill agentic-docs
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/petekp/agent-skills --skill agentic-docs

简介

用于辅助文档、README、Markdown 和内容稿件的整理与改写。

  • 适合让 Agent 提炼结构、补齐章节、统一术语或检查链接。
  • 强调代码与文档共置,优先解释“为什么”而非“做什么”。
  • 安装命令:npx skills add https://github.com/petekp/agent-skills --skill agentic-docs。
  • 注意保留项目事实,避免将未确认信息写成确定结论。

SKILL.md

Agentic Docs

Write documentation that lives with the code it describes. Plain language. No jargon. Explain the *why*, not the *what*.

Core Philosophy

Co-location wins. Documentation in separate files drifts out of sync. Comments next to code stay accurate because they're updated together.

Write for three audiences:

  1. Future you, six months from now
  2. Teammates reading unfamiliar code
  3. AI assistants (Claude, Copilot) who see one file at a time

The "why" test: Before writing a comment, ask: "Does this explain *why* this code exists or *why* it works this way?" If it only restates *what* the code does, skip it.

Documentation Levels

File Headers

Every file should open with a brief explanation of its purpose and how it fits into the larger system.

// UserAuthContext.tsx
//
// Manages authentication state across the app. Wraps the root component
// to provide login status, user info, and auth methods to any child.
//
// Why a context instead of Redux: Auth state is read-heavy and rarely
// changes mid-session. Context avoids the ceremony of actions/reducers
// for something this simple.
// NetworkRetryPolicy.swift
//
// Handles automatic retry logic for failed network requests.
// Uses exponential backoff with jitter to avoid thundering herd
// when the server comes back online after an outage.
//
// Used by: APIClient, BackgroundSyncManager
// See also: NetworkError.swift for error classification

Include:

  • What this file/module is responsible for
  • Why it exists (if not obvious from the name)
  • Relationships to other parts of the codebase
  • Any non-obvious design decisions

Function & Method Documentation

Document the contract, not the implementation.

/**
 * Calculates shipping cost based on weight and destination.
 *
 * Uses tiered pricing: under 1lb ships flat rate, 1-5lb uses
 * regional rates, over 5lb triggers freight calculation.
 *
 * Returns $0 for destinations we don't ship to rather than
 * throwing. Caller should check `canShipTo()` first if they
 * need to distinguish "free shipping" from "can't ship."
 */
function calculateShipping(weightLbs: number, zipCode: string): number
def sync_user_preferences(user_id: str, prefs: dict) -> SyncResult:
    """
    Pushes local preference changes to the server and pulls remote changes.

    Conflict resolution: server wins for security settings, local wins
    for UI preferences. See PREFERENCES.md for the full conflict matrix.

    Called automatically on app foreground. Can also be triggered manually
    from Settings > Sync Now.
    """

Include:

  • What the function accomplishes (not how)
  • Non-obvious parameter constraints or edge cases
  • What the return value means, especially for ambiguous cases
  • Side effects (network calls, file writes, state mutations)

Skip for: Simple getters, obvious one-liners, private helpers with descriptive names.

Inline Comments

Use sparingly. When you need them, explain the reasoning.

// Debounce search by 300ms to avoid hammering the API on every keystroke.
// 300ms feels responsive while cutting API calls by ~80% in user testing.
const debouncedSearch = useMemo(
  () => debounce(executeSearch, 300),
  [executeSearch]
);
// Force unwrap is safe here: viewDidLoad guarantees the storyboard
// connected this outlet. If it's nil, we want to crash immediately
// rather than fail silently later.
let tableView = tableView!
# Process oldest items first. Newer items are more likely to be
# modified again, so processing them last reduces wasted work.
queue.sort(key=lambda x: x.created_at)

Architectural Comments

For code that embodies important design decisions, explain the tradeoffs.

// ARCHITECTURE NOTE: Event Sourcing for Cart
//
// Cart state is rebuilt from events (add, remove, update quantity)
// rather than stored directly. This lets us:
// - Show complete cart history to users
// - Replay events for debugging
// - Retroactively apply promotions to past actions
//
// Tradeoff: Reading current cart state requires replaying all events.
// We cache the computed state in Redis with 5min TTL to keep reads fast.
// Cache invalidation happens in CartEventHandler.
// WHY COORDINATOR PATTERN
//
// Navigation logic lives here instead of in view controllers because:
// 1. VCs don't need to know about each other (loose coupling)
// 2. Deep linking becomes straightforward; just call coordinator methods
// 3. Navigation is testable without instantiating UI
//
// The tradeoff is more files and indirection. Worth it for apps with
// 10+ screens; overkill for simple apps.

TODO Comments

Make them actionable and traceable.

// TODO(pete): Extract to shared util once mobile team needs this too.
// Blocked on: Mobile API parity (see MOBILE-123)

// HACK: Workaround for Safari flexbox bug. Remove after dropping Safari 14.
// Bug report: https://bugs.webkit.org/show_bug.cgi?id=XXXXX

// FIXME: Race condition when user rapidly toggles. Need to cancel
// in-flight requests. Reproduced in issue #892.

Language-Specific Patterns

See references/language-examples.md for detailed examples in:

  • TypeScript/JavaScript (JSDoc, TSDoc patterns)
  • Swift (documentation comments, MARK pragmas)
  • Python (docstrings, type hint documentation)
  • React/Next.js (component documentation patterns)

Writing Style

Plain language. Write like you're explaining to a smart colleague who doesn't have context.

Active voice. "This function validates..." not "Validation is performed..."

Be specific. "Retries 3 times with 1s backoff" not "Handles retries."

Skip the obvious. If the code says user.isAdmin, don't comment "checks if user is admin."

Date things that expire. Workarounds, version-specific code, and temporary solutions should note when they can be removed.

Reference constants, don't duplicate values. When a behavior is controlled by a constant, reference it by name. Don't restate its value in the comment.

// Bad: duplicates the value, will drift when constant changes
/// Returns true if stale (not updated in last 5 minutes)
pub fn is_stale(&self) -> bool { ... }

// Good: references the constant
/// Returns true if stale (not updated within [`STALE_THRESHOLD_SECS`])
pub fn is_stale(&self) -> bool { ... }

Unit translations for magic numbers are fine (1048576 // 1MB) since they add clarity, not duplication.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.58%
按下载量换算72

OpenCode

23.37%
按下载量换算57

Codex

16.71%
按下载量换算41

Gemini CLI

12.19%
按下载量换算30

windsurf

8.17%
按下载量换算20

Cursor

3.22%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills