Skip to content
Back to skills

User Action Edge Cases

ASecurity

Use when finishing anything that depends on external state a person controls - a file, a record, a folder.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 5, 2026
ai-agents

Security analysis

A100/100

Scanned September 5, 2026

npx -y skills add Fergius-Engineering/instincts --skill user-action-edge-cases --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of User Action Edge Cases?

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

Security grade badge for User Action Edge Cases
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fergius-engineering-user-action-edge-cases/badge)](https://www.skillsdirectory.com/skills/fergius-engineering-user-action-edge-cases)

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
---
name: user-action-edge-cases
description: Use when finishing anything that depends on external state a person controls - a file, a record, a folder.
---

## The rule

Anything you depend on that a user can touch will get renamed, moved, deleted, and duplicated. If your code assumes a fixed path or a single copy, it breaks the first time the user does something ordinary. Before you finish, run those four actions through your head.

## Fires when

Your code reads, writes, or depends on a file, a record, a document, or any state the user can edit outside your code.

## How to apply

For each thing you depend on, ask the four questions: renamed? moved? deleted? duplicated?

Prefer finding things by type or id over a hardcoded path or name. Decide what happens in each case instead of assuming it won't happen.

## Worked example

Your app stores its settings in a file at a hardcoded path. It works on your machine. Then a user renames the file, and the app silently writes a fresh one with defaults, losing their config. Or they copy the project folder, and now two copies fight over the same path. Looking the file up by a stable marker instead of a fixed name, and handling "not found" and "more than one" on purpose, turns four silent bugs into defined behavior.

## Red flags

| Thought | Reality |
|---|---|
| "The file is always at this path" | Until the user moves it. |
| "There's only ever one" | Until they duplicate it. |
| "They won't rename it" | They will. |

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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