用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/TheBushidoCollective/han --skill search-code命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Review current branch changes against REVIEW.md guidelines
Use when kotlin coroutines for structured concurrency including suspend functions, coroutine builders, Flow, channels, and patterns for building efficient asynchronous code with cancellation and exception handling.
Use when building modular Angular applications requiring dependency injection with providers, injectors, and services.
基于 SOC 职业分类
| name | search-code |
| description | Search for code across your GitLab instance |
gitlab:search-code - Search for code across your GitLab instance
/search-code [arguments]
Search for code across your GitLab instance
Search for code, files, or implementations across your GitLab instance using semantic or keyword search.
/search-code [query]
This command helps you find relevant code across all accessible projects.
User: /search-code How is JWT token validation implemented?
Claude: Searching for JWT token validation implementations...
Found 4 relevant code snippets:
### 1. auth-service/src/middleware/validateToken.ts (Relevance: 95%)
```typescript
export function validateJWT(token: string): UserPayload {
try {
const decoded = jwt.verify(token, process.env.JWT_SECRET);
return decoded as UserPayload;
} catch (error) {
throw new UnauthorizedError('Invalid token');
}
}
async function verifyToken(req: Request): Promise<boolean> {
const token = req.headers.authorization?.split(' ')[1];
if (!token) return false;
return await jwt.verify(token, publicKey, { algorithms: ['RS256'] });
}
const validateAuthToken = (token: string) => {
const payload = jwt.decode(token, { complete: true });
return payload?.exp && payload.exp > Date.now() / 1000;
};
Would you like to see more results or explore any of these implementations?
### Keyword Search
User: /search-code authentication middleware
Claude: Searching for "authentication middleware"...
Found 7 results across 4 projects:
export const authenticationMiddleware = async// Authentication middleware for protected routesclass AuthenticationMiddleware {// Main authentication checkconst authMiddleware = (req, res, next) => {Would you like to see the full context for any of these files?
## Arguments
- `query` (required): Natural language description or search keywords
- For semantic search: "How do we handle user permissions?"
- For keyword search: "redis cache implementation"
## Search Types
### Semantic Search (GitLab.com only)
Best for:
- Understanding how something works
- Finding implementations by concept
- Discovering related code
- Architectural questions
Examples:
- "How are database migrations handled?"
- "Where do we validate API requests?"
- "Show me error handling patterns"
### Keyword Search (All instances)
Best for:
- Finding specific function or class names
- Locating files by name
- Searching for exact text matches
- Finding configuration values
Examples:
- "validateUserInput function"
- "config.yml database"
- "TODO: fix memory leak"
## Tips
- Use natural language for semantic search
- Be specific with your queries
- Combine with other commands for deeper analysis
- Use quotes for exact phrase matching in keyword search
- Refine your query if results aren't relevant
- Check multiple projects for consistency
- Consider privacy when searching across all projects
## Advanced Usage
### Search with Scope
User: /search-code Find all test files that test authentication, scope:tests
Claude: Searching test files for authentication tests...
### Search in Specific Project
User: /search-code Redis caching implementation in project auth-service
Claude: Limiting search to auth-service project...
### Search by File Type
User: /search-code Database connection configuration in YAML files
Claude: Searching YAML files for database configuration...
## Related Commands
- `/view-issue`: View related issues after finding code
- `/create-issue`: Create issue for bugs found during search
- `/review-mr`: Review implementations found in search results