Marketplace

project-context

Detects project tech stack, languages, frameworks, and security-relevant features. Use when you need to understand the project structure for security analysis or audit scoping.

$ 安裝

git clone https://github.com/Zate/cc-plugins /tmp/cc-plugins && cp -r /tmp/cc-plugins/plugins/security/skills/project-context ~/.claude/skills/cc-plugins

// tip: Run this command in your terminal to install the skill


name: project-context description: Detects project tech stack, languages, frameworks, and security-relevant features. Use when you need to understand the project structure for security analysis or audit scoping.

Project Context Detection

Detects and provides context about the current project's technology stack, security-relevant features, and structure.

When to Use This Skill

  • Starting a security audit - To scope which auditors are relevant
  • Analyzing attack surface - To understand what features need review
  • Writing security rules - To determine which language/framework patterns apply
  • Project onboarding - To quickly understand the tech stack

When NOT to Use This Skill

  • Context already known - Don't re-detect if .claude/project-context.json is fresh
  • Single file review - Overkill for reviewing a single file
  • Non-code tasks - Documentation, configuration-only work

Project Context Schema

The skill produces or reads .claude/project-context.json:

{
  "name": "project-name",
  "type": "web-api | web-app | cli | library | mobile | other",
  "languages": ["typescript", "python", "go", ...],
  "frameworks": ["express", "django", "react", ...],
  "features": {
    "authentication": true | false,
    "oauth": true | false,
    "file-upload": true | false,
    "websockets": true | false,
    "database": true | false,
    "api": true | false,
    "graphql": true | false,
    "payments": true | false,
    "email": true | false,
    "logging": true | false
  },
  "directories": {
    "source": "src/",
    "tests": "tests/",
    "config": "config/"
  },
  "detected_at": "2025-12-15T10:30:00Z",
  "security_notes": []
}

Detection Strategies

Language Detection

IndicatorLanguage
*.ts, *.tsx, tsconfig.jsonTypeScript
*.js, *.jsx, *.mjsJavaScript
*.py, requirements.txt, pyproject.tomlPython
*.go, go.modGo
*.rs, Cargo.tomlRust
*.java, pom.xml, build.gradleJava
*.rb, GemfileRuby
*.php, composer.jsonPHP
*.cs, *.csprojC#

Framework Detection

IndicatorFramework
express in package.jsonExpress.js
fastify in package.jsonFastify
next in package.jsonNext.js
react in package.jsonReact
vue in package.jsonVue.js
angular in package.jsonAngular
django in requirementsDjango
flask in requirementsFlask
fastapi in requirementsFastAPI
gin-gonic in go.modGin
fiber in go.modFiber
spring in pom.xmlSpring
rails in GemfileRails
laravel in composer.jsonLaravel

Feature Detection

FeatureDetection Method
authenticationAuth middleware, passport, JWT imports, login routes
oauthOAuth libraries, social auth configs, OIDC
file-uploadMulter, file upload handlers, S3 clients
websocketsSocket.io, WS library, WebSocket handlers
databaseORM imports, database clients, migration files
apiREST routes, API directories, OpenAPI specs
graphqlGraphQL libraries, schema files, resolvers
paymentsStripe, PayPal, payment webhooks
emailNodemailer, SendGrid, email templates
loggingWinston, Bunyan, logging middleware

Project Type Classification

TypeIndicators
web-apiAPI routes, no frontend build, REST/GraphQL
web-appFrontend framework + backend routes
cliBin entry, commander/yargs, no web server
librarynpm publish config, no app entry point
mobileReact Native, Flutter, mobile SDKs

Security Feature Mapping

When context is detected, map to relevant security concerns:

FeatureSecurity Domains
authenticationV6 (Authentication), V7 (Session)
oauthV10 (OAuth/OIDC)
file-uploadV5 (File Handling)
apiV4 (API Security), V1 (Encoding)
databaseV2 (Validation), V14 (Data Protection)
graphqlV4 (API Security), introspection
paymentsPCI DSS, V12 (Communications)
websocketsV17 (WebRTC/WS), V6 (Auth)

Usage

Automatic Detection

To detect project context, use the Read and Glob tools:

  1. Find config files using Glob:

    • package.json, requirements.txt, go.mod, Cargo.toml, etc.
  2. Read package files to detect frameworks:

    • Read package.json for JS/TS dependencies
    • Read requirements.txt or pyproject.toml for Python
    • Read go.mod for Go modules
  3. Scan for feature indicators using Grep:

    • Auth: passport|jwt|bcrypt|session
    • Database: prisma|sequelize|mongoose|sqlalchemy
    • File upload: multer|multipart|upload
  4. Write context to .claude/project-context.json

Manual Override

Create or edit .claude/project-context.json directly for:

  • Projects with non-standard structure
  • Additional security notes
  • Custom feature flags

Reading Context

When context exists and is fresh (<24h old):

  1. Read .claude/project-context.json
  2. Use detected info for audit scoping
  3. Skip re-detection unless requested

Freshness Check

# Check if context is stale (>24h)
if [ -f .claude/project-context.json ]; then
  detected_at=$(jq -r '.detected_at' .claude/project-context.json)
  # Compare with current time
fi

Integration

With Security Audits

The audit-orchestrator uses project context to:

  1. Select relevant domain auditors
  2. Customize audit questions
  3. Focus on detected attack surface

With Live Guards

Hooks use project context to:

  1. Apply language-specific vulnerability patterns
  2. Enable framework-specific security rules
  3. Warn about risky operations in security-sensitive areas

With Devloop

This skill is designed to be identical to devloop's project-context skill, allowing both plugins to share the same detection logic and generated context.

Output Example

{
  "name": "ecommerce-api",
  "type": "web-api",
  "languages": ["typescript", "sql"],
  "frameworks": ["express", "prisma", "jest"],
  "features": {
    "authentication": true,
    "oauth": true,
    "file-upload": true,
    "websockets": false,
    "database": true,
    "api": true,
    "graphql": false,
    "payments": true,
    "email": true,
    "logging": true
  },
  "directories": {
    "source": "src/",
    "tests": "tests/",
    "config": "config/"
  },
  "detected_at": "2025-12-15T10:30:00Z",
  "security_notes": [
    "Payment processing detected - PCI DSS considerations apply",
    "File uploads detected - validate types and scan for malware"
  ]
}

See Also

  • Skill: asvs-requirements - ASVS chapter mapping
  • Skill: vulnerability-patterns - Language-specific patterns