github-codespaces-efficiency

Audit GitHub Codespaces configurations and recommend cost and startup-time optimizations.

38.5k|4.9k|Updated Jun 11, 2025
One-click install
npx skills add https://github.com/github/awesome-copilot --skill github-codespaces-efficiency
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-codespaces-efficiency
Source: https://github.com/github/awesome-copilot/tree/main/skills/github-codespaces-efficiency
Command: npx skills add https://github.com/github/awesome-copilot --skill github-codespaces-efficiency

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

GitHub Codespaces environments often waste money and startup time through oversized devcontainer images, over-provisioned machine types, overly broad prebuild scopes, and mismatched idle timeouts. This Skill audits a repository's Codespaces setup and produces evidence-backed, guardrail-checked recommendations to reduce spend and speed up startup.

Core Features & Use Cases

  • Devcontainer Auditing: Inspects .devcontainer/ files for oversized images, unnecessary features, missing lock files, and slow bootstrap steps.
  • Cost Optimization Recommendations: Selects up to three fixes ranked by estimated monthly savings, covering machine right-sizing, prebuild scoping, and idle-timeout tuning.
  • Guardrail-Checked Fixes: Filters every recommendation through safety rules so required development tools are never removed and repo changes stay separate from org settings.
  • Use Case: A team notices high Codespaces bills and slow environment startup. Run this Skill to audit the repo, identify that prebuilds are enabled for all branches and the machine type is oversized, and receive a ranked fix list with expected savings.

Quick Start

Ask the AI to audit this repository's GitHub Codespaces configuration and recommend the top changes to reduce monthly spend and startup time.

Frequently Asked Questions about github-codespaces-efficiency

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce GitHub Codespaces costs?

Audit your devcontainer image size, machine type, prebuild scope, and idle timeout. Common fixes include trimming unused features, right-sizing machines to actual usage, limiting prebuilds to the default branch and active release branches, and setting a 30-minute idle timeout.

How to speed up Codespaces startup time?

Reduce the devcontainer image below 2 GB, keep fewer than 10 features, minimize post-create install steps, and enable prebuilds for frequently used branches. Improving Docker layer caching also shortens rebuild times.

What branches should have Codespaces prebuilds enabled?

Enable prebuilds for the default branch, release branches active in the last 14 days, and any branch with more than five Codespaces per week. Disable prebuilds for all other branches to avoid wasted build spend.

Does this work without GitHub CLI access or admin permissions?

Yes. If gh authentication fails or you lack repo admin scope, the audit proceeds with static analysis of .devcontainer/ files. Machine-type and prebuild recommendations are then marked as unverified rather than measured.

Will optimizing a devcontainer remove tools my team needs?

No. Every proposed fix passes guardrails that reject changes removing daily-use development tools or extensions. Fixes that restructure an existing config are flagged rather than silently applied, and repo changes stay separate from org-level settings.