# Detect Code and Data Patterns

Teams miss recurring defects, risky patterns, and data anomalies when reviews rely only on manual inspection. This skill guides read-only pattern searches, regex checks, and concise reports for Claude, Codex, and Claude Code.

## Install

```bash
npx skillstore add supercent-io/pattern-detection
```

## Metadata

- Status: approved
- Slug: supercent-io-pattern-detection
- Skillstore revision: r1
- Version status: missing
- Tree hash: c0d4fbd19c292b00fafad3d70d54d90aadd44254d19edd8ebb72789fd9fa0e97
- Author: supercent-io
- GitHub username: supercent-io
- License: MIT
- Repository: https://github.com/supercent-io/skills-template/tree/main/.agent-skills/pattern-detection/
- Ref: f93e9bb0daca99badb6a7e574b97737155d57cb3
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network, env\_access
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/supercent-io-pattern-detection
- Manifest: https://skillstore.pages.dev/api/skills/supercent-io-pattern-detection/manifest

## Capabilities

- Identifies code smell patterns such as long functions, magic numbers, TODO markers, and empty error handlers.
- Searches for security indicators including SQL concatenation, hard-coded secret patterns, eval calls, and unsafe innerHTML assignments.
- Uses regex examples to count sensitive data formats such as email addresses, phone numbers, IP addresses, credit cards, and SSNs.
- Demonstrates z-score, IQR, moving average, growth, and volatility checks for anomaly and trend analysis.
- Produces a severity-based pattern detection report with files, lines, descriptions, and recommended actions.

## Use Cases

- Review risky code patterns: Scan a repository for common vulnerability indicators and produce a prioritized review list.
- Find refactoring candidates: Locate long functions, duplicate patterns, magic numbers, and unfinished work before a cleanup sprint.
- Monitor data trends: Inspect time-series metrics for outliers, moving averages, growth direction, and volatility changes.

## Prompt Templates

### Find basic code smells

```
Use pattern-detection to scan this repository for TODO markers, magic numbers, empty error handlers, and long functions. Report files, lines, severity, and suggested next checks.
```

### Check security indicators

```
Use pattern-detection to find SQL concatenation, hard-coded secret patterns, eval or exec usage, and unsafe innerHTML assignments. Separate likely issues from matches that need context.
```

### Analyze data anomalies

```
Use pattern-detection on the provided metric data. Identify outliers, trend direction, moving average changes, growth rate, and volatility. Explain which findings need validation.
```

### Design a detection plan

```
Use pattern-detection to design a staged review plan for this repository and dataset. Include regex checks, structural checks, anomaly methods, priorities, and verification steps.
```

## Limitations

- A match is not proof of a defect; reviewers must inspect surrounding context.
- The skill does not modify code or apply automated fixes.
- Shell snippets are examples and may need adaptation for each repository.
- Statistical examples require suitable numeric data and Python packages when used outside the skill.

## Best Practices

- Start with a focused pattern set and expand after verifying initial matches.
- Always review surrounding code before assigning severity.
- Keep reports concise and separate security, maintainability, and data findings.

## Anti Patterns

- Treating every regex match as a confirmed vulnerability without context.
- Running broad scans that expose sensitive results in logs or chat.
- Mixing unrelated pattern types in one report without priority or severity.

## Security Audit

- Audited at: 2026-07-07T05:14:58.221\+00:00
- Summary: Most static alerts are false positives caused by Markdown code fences and read-only search examples. The hard-coded URLs are reference links, and the API-key pattern is a regex used to detect hard-coded secrets, not secret access. No prompt injection, data exfiltration intent, file modification, or runtime network behavior was found in SKILL.md.

## Stats

- Views: 134
- Downloads: 13
- Favorites: 0
- Popularity score: 0
