detect
Skill6 starsChanged 13 days agoApache-2.0View on GitHub
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.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- amondnet/yoonmoontheir own version, first seen Oct 25, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- amondnet/yoonmoon★ 17same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository42 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- attributeSkill
- auditSkill
- gap-analysis-workflowSkill
- checkpointSkill
- classifySkill
- compareSkill
- constrainSkill
- critiqueSkill
- debug-workflowSkill
- decomposeSkill
- delegateSkill
- digital-twin-bootstrapSkill
- digital-twin-sync-workflowSkill
- discover-capabilitiesSkill
- discoverSkill
- executeSkill
- explainSkill
- generateSkill
- groundSkill
- inquireSkill
- integrateSkill
- invokeSkill
- measureSkill
- mutateSkill
- observeSkill
- persistSkill
- perspective-validationSkill
- planSkill
- predictSkill
- recallSkill
- receiveSkill
- retrieveSkill
- rollbackSkill
- searchSkill
- sendSkill
- simulateSkill
- stateSkill
- synchronizeSkill
- transformSkill
- transitionSkill
- verifySkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 41
Scan target systematically: Search the target data for matching signals
- Distinctive: line 42
Use Grep for text patterns with appropriate flags (-i for case-insensitive, etc.)
- Distinctive: line 43
Use Read for structural inspection when pattern requires context
- Distinctive: line 171
Verification tools: Read (to verify file:line references exist)
- Distinctive: line 181
Do not access paths outside the specified target scope
- Distinctive: line 182
Do not modify any files during detection
- Distinctive: line 183
Stop and request clarification if detection criteria are ambiguous
- Very specific: line 198
Never use detect for complex entity classification (use identify instead)
- Very specific: line 199
Avoid detect for quantitative assessment (use estimate instead)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 |
data | Yes | any | Data to analyze |
pattern | Yes | string|object | The pattern, entity type, or condition to detect |
threshold | No | number | Detection threshold (e.g. minimum confidence for a match) |
Inputs not listed here are outside the capability's contract: a workflow step that binds them gets W604 (STANDARD v1.1 §5.5).
Procedure
- 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
- 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
- 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
- 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
- Ground claims: Attach evidence anchors to all detection signals
- Format:
file:linefor file-based targets - Include snippet of matched content for verification
- Format:
- Format output: Structure results according to the output contract below
Output Contract
Return a structured object:
detected: boolean # True if pattern/entity was found
target_type: string # What was being detected (e.g., "security vulnerability", "deprecated API")
matches:
- signal: string # Description of what was found
strength: low | medium | high # Signal strength
location: string # file:line or path where found
locations: array[string] # Every location where the pattern was found
false_positive_risk: low | medium | high # Likelihood of spurious detection
confidence: number # 0.0-1.0 based on evidence quality
evidence_anchors: array[string] # File:line references
assumptions: array[string] # Explicit assumptions made
next_actions: array[string] # 0-3 suggested follow-ups if uncertainField Definitions
| Field | Type | Description |
detected | boolean | True if the target pattern/entity was found |
target_type | string | Category of what was searched for |
matches | array<object> | Found occurrences: each detection signal with strength and location (empty when nothing found) |
locations | array[string] | Every location where the pattern was found |
false_positive_risk | enum | Assessment of detection reliability |
confidence | number | 0.0-1.0 based on evidence completeness |
evidence_anchors | array[string] | File:line references or tool outputs |
assumptions | array[string] | Explicitly stated assumptions |
Examples
Example 1: Detect SQL Injection Vulnerability
Input:
data: src/api/user_controller.py
pattern: "SQL injection pattern"
threshold: 0.5 # report matches with at least this confidenceOutput:
detected: true
target_type: "SQL injection vulnerability"
matches:
- signal: "String concatenation in SQL query with user input"
strength: high
location: "src/api/user_controller.py:47"
- signal: "Raw SQL execution without parameterization"
strength: medium
location: "src/api/user_controller.py:52"
locations:
- "src/api/user_controller.py:47"
- "src/api/user_controller.py:52"
false_positive_risk: low
confidence: 0.85
evidence_anchors:
- "src/api/user_controller.py:47"
- "src/api/user_controller.py:52"
assumptions:
- "User input flows from request.params to query variable"
- "No input sanitization in calling function"
next_actions:
- "Verify data flow from user input to SQL query"
- "Check for parameterized query alternatives in codebase"Evidence pattern: Grep for SQL keywords combined with string formatting patterns, then Read to verify context.
Example 2: Detect Deprecated API Usage
Input:
data: "src/**/*.{jsx,tsx}"
pattern: "componentWillMount|componentWillReceiveProps"Output:
detected: true
target_type: "deprecated React lifecycle method"
matches:
- signal: "componentWillMount usage"
strength: high
location: "src/components/Dashboard.jsx:23"
locations:
- "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"Verification
- Output contains
detectedboolean matching signal presence - At least one evidence anchor exists for positive detections
- Confidence score correlates with number and strength of matches
- All referenced file:line locations are valid and accessible
- False positive risk assessment is justified
Verification tools: Read (to verify file:line references exist)
Safety Constraints
mutation: falserequires_checkpoint: falserequires_approval: falserisk: low
Capability-specific rules:
- Do not access paths outside the specified target scope
- Do not modify any files during detection
- Stop and request clarification if detection criteria are ambiguous
- Report uncertainty rather than guessing when signals are weak
Composition Patterns
Commonly follows:
inspect- Detection often follows initial observation of a systemsearch- Detection may refine broad search results
Commonly precedes:
identify- Positive detection often leads to classification of what was foundestimate-risk- Detection of anomalies feeds into risk assessmentplan- Detected issues may trigger remediation planning
Anti-patterns:
- Never use detect for complex entity classification (use
identifyinstead) - Avoid detect for quantitative assessment (use
estimateinstead)
Workflow references:
- See
reference/composition_patterns.md#risk-assessmentfor detection in risk workflows - See
reference/composition_patterns.md#observe-model-actfor detection in agentic loops
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

