agentleFS
GoodnessmbakaraGoodnessmbakara/codex-skills/skills/youspeak-aws-power/SKILL.md

youspeak-aws-power

Skill1 starsChanged 3 months agoMITView on GitHub

Turn YouSpeak AWS compute on or off (ECS + RDS) for cost control. Use when the user asks to shut down AWS, stop staging, spin up staging, wake RDS, idle the cluster, aws-shutdown, aws-startup, or check YouSpeak AWS power/status.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Do not use for Terraform destroy, deleting data, or changing budgets (see cost-cap scripts separately).

    line 17
  2. Very specific:

    Read this skill: before improvising raw aws ecs / aws rds loops.

    line 85
  3. Distinctive:

    Prefer the scripts above over one-off CLI (keeps staging-vs-prod policy consistent).

    line 86
  4. Distinctive:

    Default startup is staging-only — never scale production unless the user asks.

    line 87
  5. Very specific:

    Never force-push; never commit .env or AWS/Cloudflare secrets.

    line 88
  6. Very specific:

    After shutdown/startup, run aws-status.sh (or equivalent) and report desired/running + RDS status + health code.

    line 89

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

YouSpeak AWS Power (on / off)

When to use

  • "Shut down AWS / stop staging / idle the stack"
  • "Bring staging back / start AWS / wake the API"
  • "Is AWS up?" / power status

Do not use for Terraform destroy, deleting data, or changing budgets (see cost-cap scripts separately).

Defaults (important)

SettingValue
AWS profileyouspeak-master
Regionus-east-1
ECS clusteryouspeak-cluster
RDSyouspeak-db-production (staging API uses this DB)
OffAll ECS services → desired 0 + stop RDS
On (default)Staging only (api / curriculum / arena) → desired 1 + start RDS
ProductionLeft at 0 unless --production
Arena workersLeft at 0 unless --with-workers

Still bills when "off": ALB + NAT (~$50–70/mo). Redis is Upstash (no ElastiCache). Email/notify use Cloudflare Queues when the API is up.

Repo path

Scripts live in youspeak_backend/scripts/ (run from that repo root).

cd /Users/abba/Desktop/youspeak/youspeak_backend   # or workspace youspeak_backend
export AWS_PROFILE=youspeak-master
export AWS_REGION=us-east-1

Workflow

1. Status first

./scripts/aws-status.sh

2. Shut down (idle)

Confirm with the user if destructive impact matters (staging goes down). Then:

./scripts/aws-shutdown-now.sh
./scripts/aws-status.sh

Expect: all ECS desired=0, RDS stopping/stopped. Staging health → not 200.

3. Start up (staging)

./scripts/aws-startup-now.sh --wait
./scripts/aws-status.sh

--wait blocks until https://api-staging.youspeakhq.com/health returns 200 (RDS start can take several minutes).

Optional flags:

  • --production — also scale production API/curriculum to 1
  • --with-workers — also scale arena worker services

4. After startup — quick stability

  • Health 200 on staging API
  • ECS staging services running=1
  • Optional logs: CF Queues consumers started + SAQ AI worker started (email/notify off Redis)

Agent rules

  1. Read this skill before improvising raw aws ecs / aws rds loops.
  2. Prefer the scripts above over one-off CLI (keeps staging-vs-prod policy consistent).
  3. Default startup is staging-only — never scale production unless the user asks.
  4. Never force-push; never commit .env or AWS/Cloudflare secrets.
  5. After shutdown/startup, run aws-status.sh (or equivalent) and report desired/running + RDS status + health code.
  6. Remind: ALB/NAT still cost money when ECS/RDS are off; full zero requires Terraform teardown (out of scope here).

Related docs / scripts

  • docs/deployment/COST_OPTIMIZATION.md
  • docs/deployment/UPSTASH_REDIS_MIGRATION.md
  • docs/architecture/CLOUDFLARE_QUEUES.md
  • scripts/setup-cost-cap.sh — monthly budget + emergency Lambda (separate from manual on/off)

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.