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

project-discovery项目发现

Agent Skill

project-discovery 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,350

周安装

58

GitHub Stars

28

下载量

473
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/laurigates/claude-plugins --skill project-discovery

简介

用于查找、检索和筛选项目相关信息。

  • 适合在启动阶段快速了解项目背景、目标和约束条件。
  • 可基于关键词聚类发现潜在利益相关者和关键文档。
  • 安装命令:npx skills add https://github.com/laurigates/claude-plugins --skill project-discovery
  • 建议与其他上下文工程技能配合使用。

SKILL.md

Project Discovery

Systematic project orientation to understand codebase state before making changes. Prevents working on incorrect assumptions by establishing clear context about git state, project structure, and development tooling.

Core Expertise

Automatic Activation Detection:

  • Detects uncertainty in Claude's reasoning or responses
  • Activates on manual user requests for orientation
  • Focuses on git repositories only

Discovery Capabilities:

  • Git state analysis (branch, changes, remote sync, commit history)
  • Project type identification (language, framework, monorepo detection)
  • Development tooling discovery (build, test, lint, CI/CD)
  • Documentation quick scan (README, setup instructions)
  • Risk flag identification (uncommitted work, branch divergence)

Output:

  • Structured summary of project state
  • Critical risk flags highlighted
  • Actionable next-step recommendations
  • 2-3 minute discovery timeframe

When This Skill Activates

Automatic Triggers

This skill automatically activates when Claude's internal reasoning or responses contain uncertainty phrases like:

  • "I should first understand..."
  • "Let me check the project..."
  • "Not sure about the structure..."
  • "I need to understand..."
  • "Before proceeding, let me..."
  • "I'm uncertain about..."
  • "Let me investigate the project..."

Rationale: These phrases indicate Claude is working on incomplete context, which can lead to incorrect assumptions, wrong commands, or inappropriate file edits.

Manual Invocation

Users can explicitly request project discovery with keywords:

  • "orient yourself"
  • "discover the project"
  • "understand this codebase"
  • "what's the project state?"
  • "analyze the project structure"
  • "give me project context"

When NOT to Activate

Do NOT activate this skill when:

  • Claude has clear context and is confidently executing a specific task
  • User is asking about specific code that Claude has already analyzed
  • Current conversation already established project context
  • Working in a non-git directory (this skill is git-focused)

Quick Discovery (Recommended)

For fast, consistent project orientation, run the bundled discovery script:

bash "${CLAUDE_PLUGIN_ROOT}/skills/project-discovery/scripts/discover.sh"

This replaces the manual 5-phase process below with a single execution that outputs structured data covering git state, project type, tooling, documentation, and risk assessment. Use the script output to populate the summary template in Phase 5.

For detailed reference on each phase, see the manual workflow below or scripts/discover.sh.

Systematic Discovery Workflow (Manual Alternative)

When the script is unavailable, execute this 5-step systematic discovery process. Complete all steps before providing the summary.


Step 1: Analyze git state

Goal: Understand version control state to prevent data loss and branch confusion.

Commands to Run:

# Current branch and tracking info
git branch --show-current
git status --short --branch

# Uncommitted changes summary
git status --porcelain | wc -l
git diff --stat
git diff --staged --stat

# Remote sync status
git rev-list --left-right --count HEAD...@{u} 2>/dev/null || echo "No tracking branch"

# Recent commit history (last 10 commits)
git log --oneline --decorate -n 10

# Check for conventional commits pattern
git log --oneline -n 20 | grep -E "^[a-f0-9]+ (feat|fix|docs|style|refactor|test|chore|build|ci|perf|revert)(\(.+\))?:"

What to Extract:

  • Current branch name
  • Number of uncommitted files (staged + unstaged)
  • Number of commits ahead/behind remote
  • Recent commit messages (look for patterns, conventional commits)
  • Last commit author and date
  • Whether working tree is clean

Risk Flags:

  • ⚠️ Uncommitted changes exist (risk of data loss)
  • ⚠️ Branch diverged from remote (conflicts possible)
  • ⚠️ On main/master branch (should work on feature branch)
  • ⚠️ Detached HEAD state (not on any branch)

Step 2: Detect project type

Goal: Identify language, framework, and project structure to use correct tooling.

Commands to Run:

# Check for project manifests (determines language/ecosystem)
ls -la | grep -E "(package\.json|Cargo\.toml|pyproject\.toml|go\.mod|Gemfile|pom\.xml|build\.gradle|composer\.json|mix\.exs)"

# Detect monorepo structure
find . -maxdepth 3 -name "package.json" -o -name "Cargo.toml" -o -name "pyproject.toml" | head -20

# Check directory structure
ls -d */ 2>/dev/null | head -20

# Find entry points (main files)
find . -maxdepth 2 -name "main.*" -o -name "index.*" -o -name "app.*" -o -name "__init__.py" 2>/dev/null | head -10

Project Manifest Detection:

FileLanguage/EcosystemCommon Frameworks
package.jsonJavaScript/TypeScriptReact, Vue, Next.js, Express, Node
Cargo.tomlRustActix, Rocket, Tokio
pyproject.tomlPythonDjango, FastAPI, Flask
go.modGoGin, Echo, Fiber
GemfileRubyRails, Sinatra
pom.xml / build.gradleJavaSpring, Quarkus
composer.jsonPHPLaravel, Symfony
mix.exsElixirPhoenix

What to Extract:

  • Primary language(s) and version(s)
  • Framework detected (check package.json dependencies, Cargo.toml deps, etc.)
  • Monorepo vs single-project (multiple manifests = monorepo)
  • Common directory patterns (src/, lib/, tests/, docs/)
  • Entry point files

Additional Framework Detection:

# JavaScript/TypeScript frameworks
grep -E "(react|vue|next|nuxt|svelte|angular|express|fastify|nest)" package.json 2>/dev/null

# Python frameworks
grep -E "(django|fastapi|flask|pyramid)" pyproject.toml 2>/dev/null

# Check for specific config files
ls | grep -E "(next\.config|vite\.config|webpack\.config|tsconfig|jest\.config|pytest\.ini|setup\.py)"

Step 3: Discover development tooling

Goal: Identify build system, test framework, linters, and CI/CD to run correct commands.

Commands to Run:

# Build system detection
ls -la | grep -E "(Makefile|Justfile|package\.json|Cargo\.toml|pyproject\.toml)"

# Check package.json scripts (if JS/TS project)
jq -r '.scripts | keys[]' package.json 2>/dev/null | head -20

# Check Makefile targets
grep "^[a-zA-Z0-9_-]*:" Makefile 2>/dev/null | cut -d: -f1 | head -20

# Test framework detection
find . -maxdepth 3 -name "*test*" -o -name "*spec*" 2>/dev/null | grep -E "\.(js|ts|py|rs|go)$" | head -10

# Linter/formatter detection
ls -la | grep -E "(\.eslintrc|\.prettierrc|ruff\.toml|\.flake8|rustfmt\.toml|\.golangci)"

# Pre-commit hooks
ls -la .git/hooks/ 2>/dev/null | grep -v sample
cat .pre-commit-config.yaml 2>/dev/null | head -20

# CI/CD detection
ls -la .github/workflows/ 2>/dev/null | grep "\.yml"
ls -la .gitlab-ci.yml 2>/dev/null
ls -la .circleci/config.yml 2>/dev/null

What to Extract:

Build System:

  • npm scripts (if package.json)
  • Make targets (if Makefile)
  • Cargo commands (if Rust)
  • Python build tools (setuptools, poetry, hatchling)

Test Framework:

  • Jest, Vitest, Mocha (JS/TS)
  • pytest, unittest (Python)
  • cargo test (Rust)
  • go test (Go)
  • Test file naming conventions

Linters/Formatters:

  • ESLint, Prettier (JS/TS)
  • ruff, black, flake8 (Python)
  • clippy, rustfmt (Rust)
  • golangci-lint (Go)

Pre-commit Hooks:

  • Present or absent
  • Configured tools (from.pre-commit-config.yaml)

CI/CD:

  • GitHub Actions (list workflow files)
  • GitLab CI
  • CircleCI
  • Other CI systems

Step 4: Scan documentation

Goal: Understand project purpose and setup requirements from documentation.

Commands to Run:

# README first section (project purpose)
head -50 README.md 2>/dev/null

# Check for common documentation files
ls -la | grep -E "(README|CONTRIBUTING|CHANGELOG|LICENSE|ARCHITECTURE|docs/)"

# Look for setup/installation instructions in README
grep -A 10 -i "install\|setup\|getting started" README.md 2>/dev/null | head -30

# Check for documentation directory
ls -la docs/ 2>/dev/null | head -20

What to Extract:

  • Project name and one-sentence description
  • Primary purpose (web app, library, tool, etc.)
  • Key features or capabilities
  • Setup/installation instructions present?
  • CONTRIBUTING.md exists? (indicates contributor guidance)
  • Documentation directory structure

Documentation Quality Indicators:

  • ✅ README with clear description and setup steps
  • ✅ CONTRIBUTING.md (good for contributions)
  • ✅ CHANGELOG.md (indicates release management)
  • ✅ docs/ directory (comprehensive documentation)
  • ⚠️ Missing README or minimal content
  • ⚠️ No setup instructions

Step 5: Summarize state and recommend next actions

Goal: Synthesize all findings into actionable summary with risk flags.

Output Format Template:

# Project Discovery Summary

## 📊 Project Overview
- **Type**: [Language] / [Framework] / [Monorepo or Single-project]
- **Purpose**: [One-sentence description from README]
- **Entry Point**: [Main file or startup command]

## 🔀 Git State
- **Branch**: [current-branch-name]
- **Status**: [X files changed, Y staged, Z unstaged] OR [Working tree clean]
- **Remote Sync**: [X commits ahead, Y commits behind] OR [In sync with origin]
- **Last Commit**: [Hash] - [Message] by [Author] ([Time ago])
- **Commit Style**: [Conventional commits detected] OR [Free-form commits]

### ⚠️ Risk Flags
[List any risk flags found in Phase 1, or state "None - safe to proceed"]

## 🛠️ Development Tooling

### Build System
- [Build command: npm run build / cargo build / make / etc.]

### Test Framework
- [Test command: npm test / pytest / cargo test / etc.]
- [Test file location: tests/ or src/__tests__/ or *_test.rs]

### Code Quality
- **Linters**: [ESLint / ruff / clippy / etc.]
- **Formatters**: [Prettier / black / rustfmt / etc.]
- **Pre-commit Hooks**: [Configured] OR [Not configured]

### CI/CD
- [GitHub Actions: X workflows] OR [No CI/CD detected]
- [Workflows: build.yml, test.yml, deploy.yml]

## 📚 Documentation
- **README**: [Present with setup instructions] OR [Missing or minimal]
- **CONTRIBUTING**: [Present] OR [Not present]
- **Other Docs**: [docs/ directory, ARCHITECTURE.md, etc.]

## ✅ Recommendations

[Based on findings, provide 2-4 actionable recommendations, such as:]

1. **Commit uncommitted work** - You have X unstaged files that could be lost
2. **Create feature branch** - Currently on main; create a feature branch before making changes
3. **Pull latest changes** - X commits behind origin/main
4. **Run tests before changes** - Use `[test-command]` to establish baseline
5. **Review setup instructions** - Check README.md for dependencies and setup steps
6. **Safe to proceed** - Working tree clean, branch in sync, tooling detected

---

**Discovery completed in [time]. Ready to work with clear context.**

Risk Flag Priority:

  • 🔴 Critical: Uncommitted changes + on main branch + behind remote
  • 🟡 Warning: Any single risk flag (uncommitted changes, diverged branch, etc.)
  • 🟢 Safe: Clean working tree, feature branch, in sync with remote

Integration with Other Skills

Related Skills

  • git-commit-workflow: Use after discovering conventional commit patterns
  • chezmoi-expert: If project is a dotfiles repo (detects chezmoi.toml)
  • git-security-checks: Run if pre-commit hooks detected
  • Explore agent: Delegate to this agent if deeper codebase exploration needed beyond initial orientation

When to Delegate

After project discovery, if user asks for deeper investigation:

  • "How does authentication work?" → Use Explore agent
  • "Review this code for security" → Use security-audit agent
  • "Understand the architecture" → Use code-analysis agent

Project discovery establishes baseline context; specialized skills handle deep investigation.


Error Handling & Edge Cases

Non-Git Directory

If git status fails (not a git repository):

⚠️ **Not a Git Repository**

This skill is designed for git repositories only. This directory does not have a `.git` folder.

**Recommendations:**
1. Initialize git: `git init`
2. Or navigate to a git repository
3. Or use manual exploration tools (ls, find, etc.) for non-git projects

Empty Repository

If git repo exists but has no commits:

ℹ️ **Empty Git Repository**

This is a newly initialized git repository with no commits yet.

**Recommendations:**
1. Make initial commit to establish git history
2. Check README.md for project purpose (if exists)
3. Proceed with caution - no version history to reference

Large Monorepo Performance

If discovery takes >30 seconds (e.g., huge monorepo):

ℹ️ **Large Repository Detected**

Discovery is taking longer than expected. For large monorepos, consider:

1. **Focus on specific subdirectory**: Navigate to relevant sub-project first
2. **Use targeted exploration**: Ask specific questions rather than full discovery
3. **Check monorepo docs**: Often have READMEs explaining structure

Missing Documentation

If no README.md or minimal content:

⚠️ **Documentation Sparse**

No README.md found or content is minimal.

**Recommendations:**
1. Check commit messages for context about project purpose
2. Examine directory structure and entry points
3. Look for inline code comments
4. Ask user for project context if available

Best Practices

Before Making Any Changes

  1. Always run project discovery when entering an unfamiliar codebase
  2. Check git state to preserve uncommitted work
  3. Identify tooling to use correct build/test commands
  4. Read README for setup requirements and project conventions

Discovery Efficiency

  1. Complete all 5 steps even if early steps reveal issues (comprehensive context prevents follow-up questions)
  2. Highlight risk flags prominently in summary
  3. Provide actionable recommendations specific to the project state
  4. Keep discovery focused (2-3 minutes; defer deep investigation to specialized skills)

Integration with Workflow

  1. Discovery first, then action - Establish context before editing files
  2. Update mental model - If discovery reveals surprises, re-evaluate planned approach
  3. Respect git state - Don't ignore risk flags; address them before proceeding

Quick Reference: Discovery Commands

Essential Git Commands

git branch --show-current                     # Current branch
git status --short --branch                   # Git state summary
git log --oneline -n 10                       # Recent commits
git rev-list --count HEAD...@{u}              # Commits ahead/behind remote

Project Type Detection

ls -la | grep -E "(package\.json|Cargo\.toml|pyproject\.toml|go\.mod)"
find . -maxdepth 3 -name "package.json"       # Monorepo detection

Tooling Discovery

jq -r '.scripts | keys[]' package.json        # npm scripts
grep "^[a-zA-Z0-9_-]*:" Makefile              # Make targets
ls -la .github/workflows/                      # GitHub Actions

Documentation Scan

head -50 README.md                            # Project description
ls -la | grep -E "(README|CONTRIBUTING)"      # Key docs

Example Output

See examples.md for complete discovery outputs for:

  • Python project with pytest + ruff + GitHub Actions
  • JavaScript/TypeScript project with npm + ESLint + Vitest
  • Rust project with cargo + clippy + no CI
  • Monorepo with multiple sub-projects
  • Project with uncommitted changes (risk flags)
  • Clean project ready for work

Rationale: Why Systematic Discovery Matters

Problem: Claude often works on incomplete assumptions:

  • Editing wrong branch
  • Using incorrect build commands
  • Overwriting uncommitted work
  • Missing critical tooling (tests, linters)

Solution: Systematic orientation establishes:

  • ✅ Clear git state (prevent data loss)
  • ✅ Correct project type (use right tools)
  • ✅ Available tooling (run proper commands)
  • ✅ Risk awareness (flag dangerous states)

Result: Confident, accurate work on solid foundation rather than shaky assumptions.


*For detailed command reference and more examples, see discovery-commands.md and examples.md.*

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.98%
按下载量换算161

Claude

28.57%
按下载量换算135

Cursor

19.82%
按下载量换算94

Gemini CLI

9.95%
按下载量换算47

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills