github-codespaces-efficiency
Helps your agent optimize the use of cloud development environments. It suggests ways to start faster, spend less, and use resources more efficiently.
What it does
This tool helps make GitHub Codespaces faster and cheaper. It analyzes your settings to find waste and suggests improvements.
When to use it
- ✓When you want your Codespaces to start faster.
- ✓To reduce your GitHub Codespaces costs.
- ✓When setting up a new development environment (devcontainer) or optimizing an existing one.
Example of what to ask your AI
“How can I optimize my Codespaces environment to spend less and start faster?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool first checks your current environment to identify what's consuming the most time or money. Then, it proposes up to three improvements based on this analysis, such as adjusting the machine size or simplifying the configuration.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add github/awesome-copilot --skill github-codespaces-efficiencyOr download just the file:
curl -L https://raw.githubusercontent.com/github/awesome-copilot/main/skills/github-codespaces-efficiency/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
GitHub Codespaces Efficiency
Use this skill as a lean entrypoint for GitHub Codespaces efficiency work. Inspect the repo, identify waste, and load only needed references.
If no .devcontainer/ exists yet, load references/codespaces.md and define a baseline before proceeding with the steps below.
Use This Skill When
- The user wants faster Codespaces startup or lower Codespaces spend.
- The repo has a
.devcontainer/or explicit Codespaces configuration questions. - The user asks for devcontainer optimization, machine sizing, prebuild strategy, or idle-timeout guidance.
- The user is setting up Codespaces for the first time or needs help creating a new
.devcontainer/from scratch.
Load Only What You Need
references/codespaces.md— devcontainer, machine-sizing, prebuild, idle-timeout guidance, and reporting.references/review-rubric.md— load only for review passes.
Core Workflow
1. Measure first
find .devcontainer -maxdepth 2 -type f
gh codespace list
repo=$(gh repo view --json nameWithOwner --jq .nameWithOwner)
gh api "/repos/$repo/codespaces/machines"
If gh auth fails or the user lacks repo admin scope, proceed with static analysis of .devcontainer/ files; mark machine-type and prebuild recommendations as unverified.
Look for: devcontainer image >2 GB or more than 10 features, machine type larger than usage data supports, missing devcontainer-lock.json (recommend adding — many repos predate lock-file support), prebuilds scoped too broadly, and idle timeout mismatched to usage patterns.
2. Apply guardrails
Check each proposed fix against these rules before recommending it:
- Does not remove tools the team uses every day — drop any fix that strips required development tools or extensions.
- Does not assume smaller is always better — balance machine cost against developer experience and throughput.
- Does not turn the devcontainer into a production image — drop any fix that adds production-only dependencies unless the team explicitly requires it.
- Incremental changes preferred — a greenfield baseline is appropriate only when no
.devcontainer/exists; flag (do not drop) changes that restructure an existing config. - Repo changes stay separate from org settings — split any fix that mixes repo-editable files with org-level or user-level Codespaces settings into two distinct recommendations.
3. Select the top 3 fixes
From the six candidates below, keep only those supported by audit evidence from step 1 and passing all guardrails from step 2. Rank survivors by estimated monthly cost savings (USD). Select all candidates that meet both criteria, up to a maximum of 3.
- Trim devcontainer — remove features, packages, or extensions not needed for everyday development work; target image <2 GB and fewer than 10 features
- Right-size machine type — match to observed usage patterns; if data is unavailable, state assumptions explicitly
- Scope prebuilds — enable for the default branch,
release/*branches active in the last 14 days, and branches with more than 5 Codespaces per week; disable for all others - Tune idle timeout — 30 min default; 15 min if most sessions end before 30 min; 60 min if most sessions run longer
- Remove unused extensions or port-forwarding rules
- Reduce devcontainer image size and improve layer caching
4. Verify
- Start a test Codespace to confirm devcontainer changes build and start as expected.
- Validate machine sizing against observed usage when telemetry is available; otherwise mark as unverified.
- Treat unexpected build or startup failures as real bugs even when the configuration looks correct.
Required Output
Waste sources: [top cost or startup-time drivers]
Proposed fixes: [top 3 changes supported by audit evidence and passing guardrails]
Validation: [proven live / static-only / remaining risk]
Impact:
- Startup time: [expected] / [measured if available]
- Monthly spend: [expected] / [measured if available]
- Resource utilization: [expected] / [measured if available]
References
references/codespaces.mdreferences/review-rubric.md— load when reviewing completed efficiency work
FAQ
What is a 'devcontainer'?
It's a file that defines how your development environment should be set up within Codespaces, including which tools and programs to install.
What does 'right-size machine type' mean?
It means choosing the right type of machine (computer) in Codespaces that fits your usage, not too powerful (and expensive) and not too weak (and slow).
What are 'prebuilds'?
These are pre-built development environments that can speed up Codespace startup, but they need to be configured correctly to avoid unnecessary costs.
Details
Original description by the author
Audit and improve GitHub Codespaces efficiency. Use this skill when a user wants faster Codespaces startup, lower Codespaces spend, slim devcontainers, right-size machines, tune idle timeout, or scope prebuilds to branches with sustained usage.
repo: github/awesome-copilot
Popularity
- GitHub stars
- 40k
- Ranking position
- #5170
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
acquire-codebase-knowledge
Helps your agent understand and document an existing code project. It's useful for onboarding new people or getting an overview of the architecture.
github/awesome-copilot
acreadiness-assess
Enables your agent to assess a project's readiness for AI and generate a report. It's useful for understanding how well a project is prepared to use AI tools.
github/awesome-copilot
acreadiness-generate-instructions
Helps your agent create instructions for AI tools based on an assessment. It's useful for improving how AI interacts with code and closing identified gaps.
github/awesome-copilot
acreadiness-policy
Enables your agent to help define or apply policies for AI project assessment. It's useful for standardizing how projects are evaluated and ensuring compliance.
github/awesome-copilot
Similar skills
bun-runtime
Has your agent use Bun to run, organize, and test code. It helps choose Bun over other tools and migrate existing projects.
affaan-m/ECC
database-migrations
Helps your agent make safe changes to databases. It ensures changes can be undone and minimizes downtime.
affaan-m/ECC
deployment-patterns
Sets up deployment and CI/CD workflows, containerization, and rollback strategies to ensure safe releases.
affaan-m/ECC