Skip to main content
skill GitHub Copilot official · GitHub

github-codespaces-efficiency — GitHub Copilot skill

Audit and optimize GitHub Codespaces configurations. This skill trims devcontainer images, adjusts idle timeouts, and cuts machine compute spend.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add github/awesome-copilot --skill github-codespaces-efficiency -a claude-code
Open on GitHub

What github-codespaces-efficiency does

The skill inspects .devcontainer/ configuration files and queries the GitHub CLI. It calls gh codespace list and checks the repo machine types API. Without repository admin permissions or CLI authentication, it falls back to static file analysis. It flags unverified recommendations when telemetry is missing.

The audit targets container images over 2 GB, setups with more than 10 features, and missing devcontainer-lock.json files. It ranks the top three fixes by estimated monthly savings in USD. Guardrails protect everyday developer tools from accidental removal. Changes to repository files remain strictly separated from organization-level settings.

Verification requires launching a test Codespace to validate the build. Teams facing high Codespaces bills should install this. It offers little value for projects developed strictly on local machines without devcontainers.

What it helps with

  • Cut Codespaces startup time by trimming devcontainer images
  • Right-size virtual machine types to match real workload demand
  • Scope prebuild configurations to active branches
  • Adjust idle timeout intervals to reduce idle compute spend
  • Add devcontainer-lock.json to stabilize environment builds

Example prompts for the agent

  • Audit our Codespaces configuration and suggest ways to lower monthly spend
  • Optimize .devcontainer to speed up Codespaces startup
  • Tune the idle timeout and prebuild settings for our repository branches

How to install github-codespaces-efficiency

1Skills CLI (Vercel)

npx skills add github/awesome-copilot --skill github-codespaces-efficiency -a claude-code

2Manually: put the files in place

~/.claude/skills/github-codespaces-efficiency/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/github-codespaces-efficiency/

From the same set554

The whole set →
git-commit official github This skill reviews Git changes, stages related files, and creates Conventional Commits. Use it when you want an agent to make one commit or split work into separate commits. GitHub Copilot 47,165installs excalidraw-diagram-generator official github Turn a plain-language description into an Excalidraw diagram. Useful for mapping processes, system structure, and relationships between entities. GitHub Copilot 31,639installs multi-stage-dockerfile official github This skill guides GitHub Copilot in writing multi-stage Dockerfiles for different languages and frameworks. Use it when the final runtime image should contain fewer build dependencies. GitHub Copilot 29,688installs documentation-writer official github Skill that turns the agent into a technical writer following the Diátaxis framework: tutorials, how-to guides, reference, and explanation. Proposes structure before writing. GitHub Copilot 27,757installs prd official github Turns a feature idea into a structured PRD with user stories, technical requirements, and risks. Use it when planning a software feature or an AI-powered one. GitHub Copilot 24,035installs refactor official github This skill reshapes existing code without changing its external behavior. Use it for gradual cleanup of large functions, duplication, weak types, and code smells. GitHub Copilot 22,321installs java-springboot official github Gives GitHub Copilot Spring Boot development practices, from project layout to tests and security. Use it when writing or reviewing Java application code. GitHub Copilot 21,272installs create-readme official github This skill reviews a project and creates a structured README.md. Use it when the repository needs clear documentation based on its actual files and code. GitHub Copilot 19,081installs

Similar

cto-review Alireza Rezvani This skill challenges plans on scaling, technical debt, team growth, reliability, and build-vs-buy choices. Run it before committing to an architecture decision. Claude Code 399installs vpe-advisor Alireza Rezvani Advises startup engineering leaders on DORA metrics, hiring funnels, and team structure decisions. Claude Code 389installs vpe-review Alireza Rezvani Pressure-tests engineering plans for delivery, hiring, team structure, and production discipline. Runs before quarterly planning or team reorgs. Claude Code 360installs cloud-network-insights official google Set up Cloud Network Insights, configure AppNeta synthetic monitoring, and check network or web paths. Use it when managing Monitoring Points across cloud and on-premises environments. Claude Code Gemini CLI CX Codex 78installs wizard Matt Pocock This skill creates an interactive bash wizard for manual setup steps, CI secrets, third-party dashboards, and one-off migrations. Claude Code 553,369installs hyperframes-cli heygen-com Controls HyperFrames video workflows from the CLI: audits layouts and contrast, edits timeline clips, captures snapshots, and renders locally or in cloud runtimes. Claude Code CX Codex Cursor +1 1,200,000installs setup-pre-commit Matt Pocock This skill configures pre-commit checks for a JavaScript repository, running Prettier, type checking, and tests before each commit. Claude Code 489,289installs using-git-worktrees Jesse Vincent Prepares an isolated workspace before feature work or plan execution. It checks the repository first, then uses native worktree support or Git. Claude Code CX Codex 217,153installs

Questions about github-codespaces-efficiency

How to install github-codespaces-efficiency in GitHub Copilot?

Run gh skill install github/awesome-copilot github-codespaces-efficiency in your terminal or use npx skills add github/awesome-copilot --skill github-codespaces-efficiency. You can also save the file directly to .github/skills/github-codespaces-efficiency/SKILL.md.

What does the github-codespaces-efficiency skill do?

It audits devcontainer setups, identifies images over 2 GB or with more than 10 features, evaluates machine types, and recommends up to three cost-saving fixes.

What happens if GitHub CLI authentication fails during the audit?

The skill switches to static analysis of local .devcontainer/ files. It marks all machine-type sizing and prebuild suggestions as unverified.

Source text

SKILL.md · MIT
---
name: github-codespaces-efficiency
description: '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.'
---

# 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`](./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`](./references/codespaces.md) — devcontainer, machine-sizing, prebuild, idle-timeout guidance, and reporting.
- [`references/review-rubric.md`](./references/review-rubric.md) — load only for review passes.

## Core Workflow

### 1. Measure first

```bash
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:

1. Does not remove tools the team uses every day — drop any fix that strips required development tools or extensions.
2. Does not assume smaller is always better — balance machine cost against developer experience and throughput.
3. Does not turn the devcontainer into a production image — drop any fix that adds production-only dependencies unless the team explicitly requires it.
4. Incremental changes preferred — a greenfield baseline is appropriate only when no `.devcontainer/` exists; flag (do not drop) changes that restructure an existing config.
5. 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.

1. Trim devcontainer — remove features, packages, or extensions not needed for everyday development work; target image <2 GB and fewer than 10 features
2. Right-size machine type — match to observed usage patterns; if data is unavailable, state assumptions explicitly
3. 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
4. Tune idle timeout — 30 min default; 15 min if most sessions end before 30 min; 60 min if most sessions run longer
5. Remove unused extensions or port-forwarding rules
6. 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.md`](./references/codespaces.md)
- [`references/review-rubric.md`](./references/review-rubric.md) — load when reviewing completed efficiency work

© github · MIT · github/awesome-copilot

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor