Skip to content
Back to skills

184 Fn 23 Zgk2 B6d89b9c

ASecurity

Update all regex patterns that parse epic/task IDs to support variable-length slugs while maintaining backwards compatibility with existing formats.

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 31, 2026
developmentpython

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 31, 2026

npx -y skills add tools-only/X-Skills --skill 184-fn-23-zgk2_b6d89b9c --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 184 Fn 23 Zgk2 B6d89b9c?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 184 Fn 23 Zgk2 B6d89b9c
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-184-fn-23-zgk2-b6d89b9c/badge)](https://www.skillsdirectory.com/skills/tools-only-184-fn-23-zgk2-b6d89b9c)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# fn-23-zgk.2 Update ID regex patterns

## Description
Update all regex patterns that parse epic/task IDs to support variable-length slugs while maintaining backwards compatibility with existing formats.

**Size:** M
**Files:** 
- `plugins/flow-next/scripts/flowctl.py` (4 regex locations)
- `plugins/flow-next/scripts/hooks/ralph-guard.py` (1 location)

## Approach

<!-- Updated by plan-sync: fn-23-zgk.1 already updated flowctl.py regexes with alternation pattern -->

**Already done in fn-23-zgk.1:** flowctl.py regex updates at lines 629, 1781, 4214, 6496 using:
```python
r"^fn-(\d+)(?:-[a-z0-9][a-z0-9-]*[a-z0-9]|-[a-z0-9]{1,3})?(?:\.(\d+))?$"
```

**Remaining work:** Update ralph-guard.py receipt parsing at lines 276, 280, 284:
```python
# Current: r"plan-(fn-\d+(?:-[a-z0-9]{3})?)\.json$"
# New: r"plan-(fn-\d+(?:-[a-z0-9][a-z0-9-]*[a-z0-9]|-[a-z0-9]{1,3})?)\.json$"
```
Same pattern for impl and completion matches

## Key context

The regex must accept all three formats:
- `fn-1` (legacy numeric only)
- `fn-1-abc` (current 3-char random)
- `fn-1-add-oauth-login` (new slugified)

Pattern explanation:
- `[a-z0-9]` - must start with alphanumeric
- `(?:[a-z0-9-]*[a-z0-9])?` - optional middle with hyphens, must end alphanumeric
- This prevents leading/trailing hyphens in slug
## Acceptance
<!-- Updated by plan-sync: flowctl.py items already done in fn-23-zgk.1 -->
- [x] `parse_id("fn-1")` returns valid (legacy format) - done in fn-23-zgk.1
- [x] `parse_id("fn-1-abc")` returns valid (3-char format) - done in fn-23-zgk.1
- [x] `parse_id("fn-1-add-oauth")` returns valid (slug format) - done in fn-23-zgk.1
- [x] `parse_id("fn-1.2")` returns valid (legacy task) - done in fn-23-zgk.1
- [x] `parse_id("fn-1-abc.2")` returns valid (3-char task) - done in fn-23-zgk.1
- [x] `parse_id("fn-1-add-oauth.2")` returns valid (slug task) - done in fn-23-zgk.1
- [x] `parse_id("fn-1-")` returns invalid (trailing hyphen) - done in fn-23-zgk.1
- [x] `parse_id("fn-1--double")` returns invalid (double hyphen) - done in fn-23-zgk.1
- [x] File glob patterns match all three formats - done in fn-23-zgk.1
- [ ] ralph-guard receipt parsing works with slug format
- [ ] All 45 smoke tests pass
## Done summary
Updated ralph-guard.py parse_receipt_path() regex to support variable-length slugs. All 45 smoke tests pass.
## Evidence
- Commits: c14a11f9566da386af16bf10b570c854eeb3f9da
- Tests: python3 regex acceptance tests (all pass), smoke_test.sh (45/45 pass)
- PRs:

Files in this skill

  • README.md917 B
  • skill.md2.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.