context-detector

Detect project language, framework, and existing conventions. Use when creating workflows to adapt generated artifacts to match project patterns.

16 stars

Best use case

context-detector is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Detect project language, framework, and existing conventions. Use when creating workflows to adapt generated artifacts to match project patterns.

Teams using context-detector should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/context-detector/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/context-detector/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/context-detector/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How context-detector Compares

Feature / Agentcontext-detectorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Detect project language, framework, and existing conventions. Use when creating workflows to adapt generated artifacts to match project patterns.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Context Detector

## When to Use This Skill

- Creating new workflows that should match project conventions
- Detecting project language and framework
- Analyzing existing artifacts for naming patterns
- Adapting tool suggestions to project stack

## Language Detection

Check these files to detect project language:

| File | Language/Framework |
|------|-------------------|
| `package.json` | Node.js/JavaScript/TypeScript |
| `tsconfig.json` | TypeScript |
| `Cargo.toml` | Rust |
| `go.mod` | Go |
| `pyproject.toml` | Python (modern) |
| `requirements.txt` | Python |
| `Gemfile` | Ruby |
| `pom.xml` | Java (Maven) |
| `build.gradle` | Java/Kotlin (Gradle) |
| `composer.json` | PHP |
| `mix.exs` | Elixir |
| `pubspec.yaml` | Dart/Flutter |
| `*.csproj` | C#/.NET |

## Framework Detection

### JavaScript/TypeScript Frameworks

Check `package.json` dependencies:

| Dependency | Framework |
|------------|-----------|
| `react` | React |
| `next` | Next.js |
| `vue` | Vue.js |
| `nuxt` | Nuxt |
| `@angular/core` | Angular |
| `svelte` | Svelte |
| `express` | Express.js |
| `fastify` | Fastify |
| `nestjs` | NestJS |

### Python Frameworks

Check `pyproject.toml` or `requirements.txt`:

| Package | Framework |
|---------|-----------|
| `django` | Django |
| `flask` | Flask |
| `fastapi` | FastAPI |
| `pytest` | Testing with pytest |

## Tool Suggestions by Stack

### Node.js/TypeScript
```json
{
  "formatter": "prettier",
  "linter": "eslint",
  "test": "jest or vitest",
  "typecheck": "tsc --noEmit"
}
```

### Python
```json
{
  "formatter": "black",
  "linter": "ruff or flake8",
  "imports": "isort",
  "test": "pytest",
  "typecheck": "mypy"
}
```

### Rust
```json
{
  "formatter": "rustfmt",
  "linter": "clippy",
  "test": "cargo test"
}
```

### Go
```json
{
  "formatter": "gofmt",
  "linter": "golangci-lint",
  "test": "go test"
}
```

## Existing Artifact Analysis

### Scan for Existing Patterns

1. **Commands**: Read files in `.claude/commands/`
   - Extract naming conventions (kebab-case, namespaces)
   - Note frontmatter patterns used
   - Identify tool access patterns

2. **Skills**: Read `.claude/skills/*/SKILL.md`
   - Extract description style
   - Note trigger patterns
   - Identify structure conventions

3. **Agents**: Read `.claude/agents/*.md`
   - Extract naming patterns
   - Note tool scoping patterns
   - Identify output format conventions

4. **Hooks**: Read `.claude/settings.json`
   - Identify existing hook patterns
   - Note script locations
   - Check for conflicts

### Convention Extraction Checklist

- [ ] Naming: kebab-case, snake_case, or camelCase?
- [ ] Description length: short (<100 chars) or detailed?
- [ ] Tool scoping: minimal or generous?
- [ ] Output format: markdown, JSON, or plain text?
- [ ] Error handling: fail fast or graceful degradation?

## Adapting to Conventions

### Match Existing Command Style

If existing commands use:
```markdown
---
allowed-tools: Read, Write
description: Short description
---
```

New commands should match that structure.

### Match Hook Patterns

If project uses hook scripts in `.claude/hooks/`:
- Create new scripts there, not inline
- Match the shebang style (`#!/bin/bash` vs `#!/usr/bin/env bash`)
- Match error handling patterns

### Match Skill Structure

If existing skills have:
```markdown
## When to Use
## Process
## Output Format
```

New skills should use the same sections.

## Detection Process

### Step 1: Identify Language
```bash
# Check for config files
ls -la package.json Cargo.toml go.mod pyproject.toml 2>/dev/null
```

### Step 2: Identify Framework
```bash
# For Node.js
cat package.json | jq '.dependencies | keys'
```

### Step 3: Scan Existing Artifacts
```bash
# Count existing artifacts
ls -la .claude/commands/**/*.md 2>/dev/null | wc -l
ls -la .claude/skills/*/SKILL.md 2>/dev/null | wc -l
ls -la .claude/agents/*.md 2>/dev/null | wc -l
```

### Step 4: Extract Conventions
Read 2-3 examples of each type and note patterns.

## Output Format

When reporting detected context:

```markdown
## Project Context

### Language/Framework
- Primary: TypeScript
- Framework: Next.js
- Test Framework: Jest

### Detected Tools
- Formatter: prettier (in package.json)
- Linter: eslint (in package.json)
- Build: next build

### Existing Artifacts
- Commands: 3 (kebab-case naming)
- Skills: 2 (detailed descriptions)
- Agents: 1 (minimal tool scope)
- Hooks: 2 (script-based in .claude/hooks/)

### Conventions
- Descriptions: Under 100 chars
- Tools: Minimal scoping
- Output: Markdown format
```

## Anti-Patterns

### ❌ Assuming stack without checking
Always verify by reading config files.

### ❌ Ignoring existing patterns
Match existing conventions even if not optimal.

### ❌ Over-detecting
Focus on what matters for artifact generation.

### ❌ Hard-coding tool choices
Adapt to what the project actually uses.

Related Skills

contextui

16
from diegosouzapw/awesome-omni-skill

Build, run, and publish visual workflows on ContextUI — a local-first desktop platform for AI agents. Create React TSX workflows (dashboards, tools, apps, visualizations), manage local Python backend servers, test workflows via scoped UI automation within the ContextUI app window, and optionally publish to the ContextUI Exchange. All tools operate locally on the user's machine under standard OS permissions — no remote execution or privilege escalation. Python backends bind to localhost. See SECURITY.md for the full capability scope and trust model. Requires ContextUI installed locally and MCP server configured.

contextual-pattern-learning

16
from diegosouzapw/awesome-omni-skill

Advanced contextual pattern recognition with project fingerprinting, semantic similarity analysis, and cross-domain pattern matching for enhanced learning capabilities

context7

16
from diegosouzapw/awesome-omni-skill

Fetch up-to-date library documentation via Context7 REST API. Use when needing current API docs, framework patterns, or code examples for any library. Use when user asks about React, Next.js, Prisma, Express, Vue, Angular, Svelte, or any npm/PyPI package. Use when user says 'how do I use X library', 'what's the API for Y', or needs official documentation. Lightweight alternative to Context7 MCP with no persistent context overhead.

context7-usage

16
from diegosouzapw/awesome-omni-skill

Patterns for using Context7 MCP for library documentation (v2.25)

context7-efficient

16
from diegosouzapw/awesome-omni-skill

Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.

context7-docs

16
from diegosouzapw/awesome-omni-skill

Fetch official library docs via Context7 MCP. Use for Tailwind CSS docs (grid, responsive variants), React, Next.js, Vue, MCP, OpenCode, or any npm library. Always use before external web search.

context7-auto-research

16
from diegosouzapw/awesome-omni-skill

Automatically fetch latest library/framework documentation for Claude Code via Context7 API

context-optimization

16
from diegosouzapw/awesome-omni-skill

Apply compaction, masking, and caching strategies

context-memory

16
from diegosouzapw/awesome-omni-skill

Advanced context and memory management system for AI agents. Provides persistent memory across sessions through daily logs (memory/YYYY-MM-DD.md), long-term curated memory (MEMORY.md), conversation archives with semantic search, and automatic behavioral learning from user satisfaction tracking. Use when you need to: (1) Remember information across sessions, (2) Archive conversations before context loss, (3) Search past discussions, (4) Track and learn from user satisfaction patterns, (5) Maintain session continuity, (6) Implement proactive memory maintenance. Includes conversation-archiver.py and satisfaction-tracker.py scripts, session startup routines, and periodic reflection workflows.

context-engineering

16
from diegosouzapw/awesome-omni-skill

Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.

context-driven-development

16
from diegosouzapw/awesome-omni-skill

Use this skill when working with Conductor's context-driven development methodology, managing project context artifacts, or understanding the relationship between product.md, tech-stack.md, and...

context-detection

16
from diegosouzapw/awesome-omni-skill

Automatically detect project tech stack, frameworks, and development context