Context Fetch by toonight/get-shit-done-for-antigravity
npx skills add https://github.com/toonight/get-shit-done-for-antigravity --skill 'Context Fetch'核心原则: 先搜索,再针对性阅读,绝不盲目加载完整文件。
在以下情况开始前激活此技能:
你试图找到或理解什么?
示例:
processPayment 函数?"提取可搜索的术语:
| 问题 | 关键词 |
|---|---|
| 登录端点 | login, auth, POST.*login |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 缓存层 | cache, redis, memoize |
| 支付调用 | processPayment, payment |
PowerShell:
# 简单模式搜索
Select-String -Path "src/**/*.ts" -Pattern "login" -Recurse
# 使用 ripgrep(如果可用)
rg "login" --type ts
Bash:
# 使用 ripgrep(推荐)
rg "login" --type ts
# 使用 grep
grep -r "login" src/ --include="*.ts"
从搜索结果中,识别:
只阅读有依据的部分:
# 读取特定行范围(PowerShell)
Get-Content "src/auth/login.ts" | Select-Object -Skip 49 -First 30
# 读取特定函数(使用 view_code_item 工具)
# view_code_item: src/auth/login.ts -> handleLogin
调用此技能时,请提供:
| 输入 | 描述 | 示例 |
|---|---|---|
| 问题 | 你试图找到什么 | "用户验证在哪里?" |
| 范围 | 目录或文件模式 | src/, *.service.ts |
| 关键词 | 要搜索的术语 | validate, user, schema |
执行此技能后,报告:
# 错误做法:读取 5 个完整文件来"理解上下文"
Read: src/auth/login.ts (500 行)
Read: src/auth/register.ts (400 行)
Read: src/auth/types.ts (200 行)
# 正确做法:先搜索,只读取所需内容
Search: "validatePassword" in src/auth/
Found: login.ts:45, register.ts:78
Read: login.ts lines 40-60
# 错误做法:搜索常见术语
Search: "function" → 10,000 个结果
# 正确做法:搜索特定标识符
Search: "validateUserCredentials" → 3 个结果
跟踪你的效率:
| 指标 | 良好 | 较差 |
|---|---|---|
| 已搜索文件数 | 10+ | <5 |
| 完全读取文件数 | <3 | 10+ |
| 已读取行数 | <200 | 1000+ |
| 针对性读取部分 | 是 | 否 |
此技能支持 GSD 的上下文管理:
1. 定义问题 → 我在找什么?
2. 提取关键词 → 搜索什么术语?
3. 搜索代码库 → rg/grep/Select-String
4. 评估结果 → 哪些文件重要?
5. 针对性阅读 → 仅读取特定行
6. 报告发现 → 候选文件 + 摘录
属于 GSD 方法论的一部分。请参阅 PROJECT_RULES.md 了解搜索优先的规则。
每周安装次数
–
代码仓库
GitHub 星标数
672
首次出现时间
–
安全审计
Core principle: Search first, read targeted sections, never load full files blindly.
Activate this skill before :
What are you trying to find or understand?
Examples:
processPayment function?"Extract searchable terms:
| Question | Keywords |
|---|---|
| Login endpoint | login, auth, POST.*login |
| Caching layer | cache, redis, memoize |
| Payment calls | processPayment, payment |
PowerShell:
# Simple pattern search
Select-String -Path "src/**/*.ts" -Pattern "login" -Recurse
# With ripgrep (if available)
rg "login" --type ts
Bash:
# With ripgrep (recommended)
rg "login" --type ts
# With grep
grep -r "login" src/ --include="*.ts"
From search results, identify:
Only read what's justified:
# Read specific line range (PowerShell)
Get-Content "src/auth/login.ts" | Select-Object -Skip 49 -First 30
# Read specific function (with view_code_item tool)
# view_code_item: src/auth/login.ts -> handleLogin
When invoking this skill, provide:
| Input | Description | Example |
|---|---|---|
| Question | What you're trying to find | "Where is user validation?" |
| Scope | Directory or file pattern | src/, *.service.ts |
| Keywords | Terms to search for | validate, user, schema |
After executing this skill, report:
# BAD: Reading 5 full files to "understand context"
Read: src/auth/login.ts (500 lines)
Read: src/auth/register.ts (400 lines)
Read: src/auth/types.ts (200 lines)
# GOOD: Search first, read only what's needed
Search: "validatePassword" in src/auth/
Found: login.ts:45, register.ts:78
Read: login.ts lines 40-60
# BAD: Searching for common terms
Search: "function" → 10,000 results
# GOOD: Searching for specific identifiers
Search: "validateUserCredentials" → 3 results
Track your efficiency:
| Metric | Good | Poor |
|---|---|---|
| Files searched | 10+ | <5 |
| Files fully read | <3 | 10+ |
| Lines read | <200 | 1000+ |
| Targeted sections | Yes | No |
This skill supports GSD's context management:
1. Define question → What am I looking for?
2. Extract keywords → What terms to search?
3. Search codebase → rg/grep/Select-String
4. Evaluate results → Which files matter?
5. Read targeted → Specific lines only
6. Report findings → Candidates + extracts
Part of GSD methodology. See PROJECT_RULES.md for search-first discipline rules.
Weekly Installs
–
Repository
GitHub Stars
672
First Seen
–
Security Audits
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
109,600 周安装