AI SummaryA pattern detection skill that determines whether specific entities, conditions, or signals exist in data sources, returning binary presence/absence results with confidence scores. Useful for developers building search, validation, and anomaly detection features into Claude-powered applications.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to install the "detect" skill in my project. Repository: https://github.com/majiayu000/claude-skill-registry Please read the repo to find the SKILL.md file(s), then: 1. Download them into the correct skills directory (.claude/skills/ or .cursor/skills/) 2. Include any companion files referenced by the skill 3. Confirm what was installed and where
Description
Determine whether a specific pattern, entity, or condition exists in the given data. Use when searching for patterns, checking existence, validating presence, or finding signals.
Example 2: Detect Deprecated API Usage
Input: `yaml target: src/ pattern: "componentWillMount|componentWillReceiveProps" scope: ".jsx,.tsx" ` Output: `yaml detected: true target_type: "deprecated React lifecycle method" signals: • signal: "componentWillMount usage" strength: high location: "src/components/Dashboard.jsx:23" false_positive_risk: low confidence: 0.95 evidence_anchors: • "src/components/Dashboard.jsx:23" assumptions: • "Project uses React 16.3+ where these methods are deprecated" next_actions: • "Migrate to componentDidMount or useEffect hook" `
Intent
Scan data sources to determine whether a specified pattern, entity, or condition is present. Detection is binary (present/absent) with associated signal strength. Success criteria: • Clear boolean determination of presence/absence • At least one evidence anchor for positive detections • False positive risk assessment provided • Confidence score justified by evidence quality Compatible schemas: • schemas/output_schema.yaml
Inputs
| Parameter | Required | Type | Description | |-----------|----------|------|-------------| | target | Yes | string\|object | The data source to scan (file path, URL, or structured data) | | pattern | Yes | string\|regex | The pattern, entity type, or condition to detect | | threshold | No | object | Detection sensitivity settings (e.g., min_matches, confidence_floor) | | scope | No | string | Limit search to specific regions (e.g., "functions", "imports", "comments") |
Procedure
1) Define detection criteria: Clarify exactly what constitutes a positive detection • Convert vague patterns to concrete search terms or regex • Establish minimum evidence threshold for positive detection 2) Scan target systematically: Search the target data for matching signals • Use Grep for text patterns with appropriate flags (-i for case-insensitive, etc.) • Use Read for structural inspection when pattern requires context • Record location (file:line) for each potential match 3) Evaluate signal strength: For each match, assess how strongly it indicates true presence • Strong: exact match with clear context • Medium: partial match or ambiguous context • Weak: possible match requiring human verification 4) Assess false positive risk: Determine likelihood that detections are spurious • High risk: generic patterns, noisy data, few matches • Low risk: specific patterns, clean data, multiple corroborating signals 5) Ground claims: Attach evidence anchors to all detection signals • Format: file:line for file-based targets • Include snippet of matched content for verification 6) Format output: Structure results according to the output contract below
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster