mirror of
https://github.com/github/awesome-copilot.git
synced 2026-05-28 01:21:46 +00:00
12666c97ee
* fresh pull of updated stage with 2 skills and updated README only * adjusted skills after feedback and used skill analyser to review --------- Co-authored-by: Mark Heynes <mutl3y@heynes.biz>
2.1 KiB
2.1 KiB
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:
- Check whether
.devcontainer/exists. - If it does not exist, gather baseline requirements first: language/toolchain, required CLIs, expected startup target, machine-size constraints, and whether prebuilds are needed.
- Review
.devcontainer/devcontainer.json. - Ensure
.devcontainer/devcontainer-lock.jsonexists; if missing, recommend adding it because many repos predate lock-file support. - Review related Dockerfiles, features, and setup scripts.
- 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
- Remove unnecessary packages, features, and extensions
- Reduce startup commands and post-create installs
- Recommend the smallest machine size that preserves throughput
- Narrow prebuild scope to sustained-usage branches (default branch, active release branches, and any branch with more than five Codespaces per week)
- 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