# Saml Latest Planfile

> Finds the latest plan file in `./.plan/` directory (excludes *.review.md and *.fixplan.md). Trigger this automatically when you need to locate the latest plan file.

- Skill: `saml/saml-latest-planfile` (Agent Skill)
- Install (CLI): `npx skillmds@latest add saml/saml-latest-planfile`
- Raw SKILL.md: https://api.skillmd.com/api/skills/saml/saml-latest-planfile/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: saml (https://skillmd.com/u/saml)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/saml/saml-latest-planfile

---


Find the latest plan file using the following script:

```bash
#!/usr/bin/env bash
files=( ./.plan/2*.md )
echo "${files[-1]}"
```

Exclude files matching `*.review.md` and `*.fixplan.md`.

If no plan file is found (the glob returns the literal pattern), stop with:
"❌ No plan file found. Run `saml-plan` first."

Otherwise, return the file path.

