agentleFS
lifedeverlifedever/skills-plugin/skills/dev-launcher/SKILL.md

dev-launcher

Skill14 starsChanged 6 months agoMITView on GitHub

Use when the user wants a single one-command script to start a project's frontend and backend together for local development. Triggers: "生成启动脚本", "帮我生成启动脚本", "写一个dev.sh", "写启动脚本", "前后端一起启动", "一键启动前后端", "一键启动脚本", "generate dev script", "create launch script", "one command to run frontend and backend".

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Spring profile: Check for application-dev.yml.

    line 34
  2. Very specific:

    Frontend dev command: Read package.json scripts.dev to confirm.

    line 36
  3. Very specific:

    Read references/template.sh and replace all {{...}} placeholders.

    line 40
  4. Very specific:

    Write to ./dev.sh, run chmod +x ./dev.sh, show brief usage to user.

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dev Launcher

Generate a dev.sh script that starts frontend and backend together with interactive controls (restart, status, quit).

Workflow

1. Detect project structure

Scan the project root to identify:

Backend (check in order, first match wins):

  • pom.xml → Maven + Spring Boot
  • build.gradle / build.gradle.kts → Gradle + Spring Boot
  • go.mod → Go project
  • requirements.txt / pyproject.toml → Python project

Frontend package manager (check in order):

  • pnpm-lock.yaml → pnpm
  • yarn.lock → yarn
  • package-lock.json → npm

Directory names: List root to find server/client dirs. Common patterns: *-server/*-client, backend/frontend, server/client, api/web.

Spring profile: Check for application-dev.yml. If exists, default to dev. Respect user-specified profile.

Frontend dev command: Read package.json scripts.dev to confirm.

2. Fill template

Read references/template.sh and replace all {{...}} placeholders.

PlaceholderDescription
{{SERVER_DIR_NAME}}Server directory name
{{CLIENT_DIR_NAME}}Client directory name
{{SERVER_PGREP_PATTERN}}pgrep pattern uniquely identifying this project (abs-path fragment, not a bare common dir name)
{{CLIENT_PGREP_PATTERN}}pgrep pattern uniquely identifying this project (abs-path fragment, not a bare common dir name)
{{SERVER_START_LOG}}Log message for server start
{{SERVER_START_CMD}}Full server start command
{{CLIENT_START_LOG}}Log message for client start
{{CLIENT_START_CMD}}Full client start command
{{SERVER_EXTRA_PGREP}}Extra pgrep logic for Maven/Gradle, or remove line

3. Backend variants

Maven + Spring Boot:

PATTERN: spring-boot:run.*{{DIR}}
CMD: mvn clean spring-boot:run -P{{PROFILE}} -Dspring-boot.run.profiles={{PROFILE}} -Dspring.output.ansi.enabled=ALWAYS
EXTRA_PGREP: local mvn_pids=$(pgrep -f "maven.*{{DIR}}" 2>/dev/null)
             pids=$(echo -e "${pids}\n${mvn_pids}" | sort -u | grep -v '^$')

Why clean and -P: Maven resources filtering only copies application-${profileActive}.yml to target. Without clean, stale resource files in target may be used. Without -P{{PROFILE}}, the default active profile (often local) determines which yml files get copied, causing config mismatch when spring-boot.run.profiles differs.

Gradle + Spring Boot:

PATTERN: bootRun.*{{DIR}}
CMD: ./gradlew bootRun --args='--spring.profiles.active={{PROFILE}}'
EXTRA_PGREP: local gradle_pids=$(pgrep -f "gradle.*{{DIR}}" 2>/dev/null)
             pids=$(echo -e "${pids}\n${gradle_pids}" | sort -u | grep -v '^$')

Go: PATTERN: go run.*{{DIR}}, CMD: go run ., no extra pgrep.

Python: PATTERN: python.*{{DIR}}, CMD: python manage.py runserver (or uvicorn/flask), no extra pgrep.

4. Frontend variants

  • pnpm: FORCE_COLOR=1 pnpm dev
  • yarn: FORCE_COLOR=1 yarn dev
  • npm: FORCE_COLOR=1 npm run dev

5. Critical rules

  • NEVER kill by port. lsof -i:PORT matches client connections to that port too, not just the listener — feeding it to kill will take down unrelated apps. Match only by project-specific pgrep patterns.
  • All background commands MUST use < /dev/null — prevents stdin conflicts with Vite/webpack keyboard shortcuts.
  • pgrep patterns MUST be uniquely identifying. Anchor with an absolute-path fragment of the project (e.g. spring-boot:run.*/abs/path/to/proj/server), not just a bare directory name. If the dir name is a common word (web, api, server, app, client), a bare-name pattern will also match other projects' processes and kill them — always include enough of the path to be unique to this project.
  • Never escalate to kill -9 on a stale PID list. Between SIGTERM and SIGKILL a PID may be recycled by the OS; re-match by pattern before force-killing so you only ever -9 processes that still belong to this project.

6. Output

Write to ./dev.sh, run chmod +x ./dev.sh, show brief usage to user.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.