Skip to content
Back to skills

133 Fn 23 Zgk1 E547a33a

ASecurity

Add a stdlib-only `slugify()` function and integrate it into epic creation.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
developmentpythongodjango

Security analysis

A100/100

Scanned October 11, 2026

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

Installs into .claude/skills of the current project.

Are you the author of 133 Fn 23 Zgk1 E547a33a?

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

Security grade badge for 133 Fn 23 Zgk1 E547a33a
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-133-fn-23-zgk1-e547a33a/badge)](https://www.skillsdirectory.com/skills/tools-only-133-fn-23-zgk1-e547a33a)

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

SKILL.md
# fn-23-zgk.1 Add slugify and update epic creation

## Description
Add a stdlib-only `slugify()` function and integrate it into epic creation.

**Size:** M
**Files:** `plugins/flow-next/scripts/flowctl.py`

## Approach

1. Add `slugify()` function after line 582 (after `generate_epic_suffix`):
   - Use Django pattern (unicodedata + re, no deps)
   - Max 40 chars (leaves room for `fn-XXX-` prefix in 63 char limit)
   - Return `None` if result is empty (for fallback)

2. Update `cmd_epic_create()` at line 2664-2665:
   - Call `slugify(args.title)` 
   - Fallback to `generate_epic_suffix()` if slugify returns None/empty
   - Keep existing random suffix as fallback for edge cases

## Key context

Django's slugify pattern (no external deps):
```python
import re, unicodedata
text = unicodedata.normalize("NFKD", text).encode("ascii", "ignore").decode("ascii")
text = re.sub(r"[^\w\s-]", "", text.lower())
text = re.sub(r"[-\s]+", "-", text).strip("-_")
```

Edge cases requiring fallback to random:
- Empty title: `--title ""`
- Only special chars: `--title "!@#$"`
- Unicode-only: `--title "中文"` (with ascii encoding)
## Acceptance
- [ ] `slugify("Add OAuth Login")` returns `"add-oauth-login"`
- [ ] `slugify("Fix bug #123!")` returns `"fix-bug-123"`
- [ ] `slugify("Multiple   spaces")` returns `"multiple-spaces"`
- [ ] `slugify("")` returns `None` (empty)
- [ ] `slugify("!@#$%")` returns `None` (no alphanumeric)
- [ ] Long titles truncate at word boundary within 40 chars
- [ ] `flowctl epic create --title "Add OAuth"` produces `fn-N-add-oauth`
- [ ] `flowctl epic create --title ""` falls back to 3-char random
- [ ] Existing tests still pass
## Done summary
Added slugify() function using Django pattern (stdlib only) and updated epic creation to use slugified titles as suffixes with random fallback. Updated regex patterns in both plugin and vendored copies for parity.
## Evidence
- Commits: 453eac5, f5b5488
- Tests: smoke_test.sh (45/45 pass)
- PRs:

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.