Token导航 LogoToken导航TokenDH.com
AI 工具执行命令github未标认证来源可访问clear审计异常

rules-capture规则捕获

Agent Skill

rules-capture 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,472

周安装

103

GitHub Stars

21

下载量

824
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/shipshitdev/library --skill rules-capture

简介

rules-capture 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Rules Capture Skill

This skill automatically detects when users express preferences, rules, or coding standards during conversations and documents them for future sessions.


When This Skill Activates

Automatically activate when the user mentions ANY of these:

Direct Rule Expressions

  • "always do X" / "never do X"
  • "I prefer X" / "I don't like X"
  • "don't ever X" / "stop doing X"
  • "from now on X" / "going forward X"
  • "that's not how we do it" / "we do it this way"
  • "the rule is X" / "the standard is X"

Coding Style Expressions

  • "use X pattern" / "don't use X pattern"
  • "name things like X" / "format like X"
  • "import from X" / "don't import from X"
  • "the convention is X"
  • "follow the X pattern"

Frustration Indicators (Capture these especially!)

  • "why did you X" / "stop doing X"
  • "I told you before" / "I already said"
  • "that's wrong" / "that's not right"
  • "fix this" / "change this"
  • Any profanity + instruction (strong signal!)

Questions About Standards

  • "what's the rule for X" / "how should I X"
  • "is it X or Y" / "which way is correct"
  • "what's the coding style for X"

Capture Process

When a rule/preference is detected:

1. Acknowledge Detection

I noticed you expressed a preference/rule. Let me capture this.

2. Extract Rule Details

Parse the user's statement to identify:

  • Category: What area does this apply to? (coding, naming, imports, patterns, tools, communication)
  • Rule Type: ALWAYS, NEVER, PREFER, AVOID
  • Specific Action: What exactly should/shouldn't be done
  • Context: When does this apply
  • Example: Good vs bad example if mentioned

3. Document to Capture File

Append to .agents/SYSTEM/CAPTURED-RULES.md:

### [YYYY-MM-DD HH:MM] - [Category]: [Short Title]

**User said:**

> "[Exact quote from user]"

**Rule extracted:**

- **Type**: [ALWAYS | NEVER | PREFER | AVOID]
- **Action**: [What to do/not do]
- **Context**: [When this applies]
- **Category**: [coding | naming | imports | patterns | tools | communication | workflow]

**Example:**

// Good [good example]

// Bad [bad example]

Status: PENDING_REVIEW

### 4. Confirm with User

Captured this rule:

  • [Brief summary of the rule]

Should I add this to the permanent rules? [Yes/No/Modify]

### 5. On Confirmation
- Move to `USER-PREFERENCES.md` under appropriate section
- Or create new section in `RULES.md` if it's a coding standard
- Remove from `CAPTURED-RULES.md` (or mark as PROCESSED)

---

## Rule Categories

### Coding Rules
- Pattern preferences
- Import conventions
- Naming conventions
- File structure
- Component patterns

### Workflow Rules
- Build/test preferences
- Git workflow
- Documentation requirements
- Communication style

### Tool Rules
- CLI preferences
- IDE settings
- Terminal behavior
- Background processes

### Communication Rules
- Response style
- Verbosity preferences
- Explanation depth
- Acknowledgment patterns

---

## Storage Locations

| Rule Type | Storage Location |
|-----------|------------------|
| Personal preferences | `../.agents/SYSTEM/ai/USER-PREFERENCES.md` |
| Coding standards | `.agents/SYSTEM/RULES.md` |
| Critical rules | `../.agents/SYSTEM/critical/CRITICAL-NEVER-DO.md` |
| Pending review | `../.agents/SYSTEM/CAPTURED-RULES.md` |

---

## Auto-Capture File Format

File: `../.agents/SYSTEM/CAPTURED-RULES.md`

Captured Rules - Pending Review

Rules automatically captured from conversations. Review and promote to permanent docs.


Pending Rules

[Auto-captured rules appear here]


Processed Rules

[Rules that have been promoted to permanent docs]


---

## Integration with Other Skills

This skill works with:

- **docs**: For formatting captured rules properly
- **session-documenter**: Rules captured during session are included in session docs

---

## Cleanup Command

When user says "clean up rules" or "process captured rules":

1. Read `CAPTURED-RULES.md`
2. Present each pending rule for review
3. User can: Approve, Modify, Delete
4. Approved rules get promoted to permanent docs
5. File is cleaned up

---

## Example Interaction

**User**: "stop using console.log for debugging, use the logger service"

**Claude**:

I noticed a new rule. Let me capture it:

Rule: Use logger service instead of console.log for debugging Category: Coding Type: NEVER (console.log) / ALWAYS (logger service)

Added to captured rules. Should I promote this to permanent coding rules?


---

## Activation Triggers

The skill activates on these regex patterns:

Direct commands

(always|never|don't|stop|from now on|going forward)\s+.+ (prefer|like|want|need)\s+(you to|it to|this to)\s+.+ (the rule is|the standard is|the convention is)\s+.+

Frustration signals

(why (did|do) you|stop doing|I told you|I already said)\s+.+ (that's (wrong|not right|incorrect)|fix this|change this)\s+.+

Questions about standards

(what's the (rule|standard|convention) for|how should I|which way is)\s+.+


---

**When this skill is active**, you will automatically capture and document any rules, preferences, or standards the user expresses, ensuring nothing is forgotten between sessions.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

Claude Code

32.24%
按下载量换算266

Antigravity

22.49%
按下载量换算185

Gemini CLI

18.99%
按下载量换算156

Codex

13.18%
按下载量换算109

OpenCode

7.18%
按下载量换算59

Cursor

3.47%
按下载量换算29

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/shipshitdev/library --skill rules-capture;npx skills add shipshitdev/library --skill "rules-capture" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills