All skills
github avatar

/github-codespaces-efficiency

@12666c9 official
by githubgithub/awesome-copilot40k stars
5,040

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.

Use this Skill: https://skilld.dev/gh/github/awesome-copilot/github-codespaces-efficiency

This session only. Nothing lands on disk.

referencescodespaces.md

≈531 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Codespaces and Devcontainer Efficiency

Load this reference only when the task involves .devcontainer/, Codespaces sizing, prebuilds, or workspace cost.

If the repo is onboarding Codespaces for the first time, define a minimal baseline first, then optimize.

Audit Order

Inspect in this order:

  1. Check whether .devcontainer/ exists.
  2. If it does not exist, gather baseline requirements first: language/toolchain, required CLIs, expected startup target, machine-size constraints, and whether prebuilds are needed.
  3. Review .devcontainer/devcontainer.json.
  4. Ensure .devcontainer/devcontainer-lock.json exists; if missing, recommend adding it because many repos predate lock-file support.
  5. Review related Dockerfiles, features, and setup scripts.
  6. Review docs that recommend machine sizes, prebuilds, or startup expectations.

For new setups (step 2), start minimal and avoid optional tools until usage data justifies them.

Common Waste Sources

  • Oversized base images
  • Unnecessary packages or extensions
  • Slow post-create bootstrap steps
  • Prebuilds enabled for too many branches
  • Missing guidance on machine sizing or idle timeout discipline

Preferred Fix Order

  1. Remove unnecessary packages, features, and extensions
  2. Reduce startup commands and post-create installs
  3. Recommend the smallest machine size that preserves throughput
  4. Narrow prebuild scope to sustained-usage branches (default branch, active release branches, and any branch with more than five Codespaces per week)
  5. Add or tighten idle-timeout and cleanup guidance

Safe-Change Rules

  • Do not optimize startup by removing tools the team actually needs every day.
  • Distinguish repo changes from org or user settings.
  • Prefer documentation when the effective control lives outside the repo.
  • Avoid turning the devcontainer into a production-like image unless the team explicitly needs that.

Reporting Focus

When reporting Codespaces improvements, separate:

  • Faster startup
  • Lower steady-state workspace cost
  • Lower prebuild spend
  • Guidance-only recommendations that still need org or user action

Source: SKILL.md on GitHub

No alerts3mo3 checks · Risk SAFE
  • Gen Agent Trust Hub3mo

    This skill provides a structured workflow for optimizing GitHub Codespaces by auditing configurations and usage patterns using standard GitHub CLI tools. No security risks were identified.

  • Socket3mo

    No alerts

  • Snyk3mo

    Risk: LOW · No issues

Signed by skilld at 12666c9. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 20 hours ago.

Activeupdated 4 months ago
  • github-codespaces
  • devcontainer
  • codespaces
  • machine-sizing
  • prebuilds
  • cost-optimization
  • startup-time
  • idle-timeout

README badge

README badge for github/awesome-copilot/github-codespaces-efficiency

Audits GitHub Codespaces configuration to identify startup delays and cost waste, then recommends up to 3 prioritized fixes: trimming devcontainer image size and features, right-sizing machine type, scoping prebuilds to active branches, or tuning idle timeout. Targets repos with existing `.devcontainer/` configuration or those setting up Codespaces for the first time.

Generated from the current SKILL.md.

Does this skill work without GitHub CLI access or admin permissions?
Yes. If `gh` auth fails or the user lacks repo admin scope, the skill falls back to static analysis of `.devcontainer/` files. Machine-type and prebuild recommendations will be marked as unverified.
Will this skill remove development tools my team uses daily?
No. The skill has a guardrail that prevents recommending any fix that strips required development tools or extensions. Any such change is dropped before recommendations are made.
Can this skill set up a devcontainer from scratch?
Yes. If no `.devcontainer/` exists, the skill loads the codespaces reference guide and defines a baseline configuration before proceeding with optimization steps.
How many fixes does this skill recommend?
Up to 3, selected from six candidates based on audit evidence and guardrails. Only fixes with measured cost savings and passing all safety checks are included.
Does this skill handle org-level Codespaces settings?
No. The skill keeps repo-editable changes separate from org-level or user-level settings and flags any needed org-level changes as distinct from repo recommendations.

Generated from the current SKILL.md. These answers refresh after source changes.