github-codespaces-efficiency

Use when optimizing GitHub Codespaces — faster startup times, lower spend, slimmer devcontainers, right-sizing machines, or scoping prebuilds.

8 stars

Best use case

github-codespaces-efficiency is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when optimizing GitHub Codespaces — faster startup times, lower spend, slimmer devcontainers, right-sizing machines, or scoping prebuilds.

Teams using github-codespaces-efficiency should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/github-codespaces-efficiency/SKILL.md --create-dirs "https://raw.githubusercontent.com/drvoss/everything-copilot-cli/main/skills/copilot-exclusive/github-codespaces-efficiency/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/github-codespaces-efficiency/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How github-codespaces-efficiency Compares

Feature / Agentgithub-codespaces-efficiencyStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when optimizing GitHub Codespaces — faster startup times, lower spend, slimmer devcontainers, right-sizing machines, or scoping prebuilds.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# GitHub Codespaces Efficiency

Audit GitHub Codespaces efficiency with a GitHub-native lens. Focus on devcontainer size,
startup time, machine sizing, prebuild scope, and idle-time discipline without stripping away
tools the team relies on every day.

## Why This is Copilot-Exclusive

GitHub Codespaces is a GitHub-native development environment. This skill is most useful when
you can inspect repository configuration, correlate it with `gh`-based Codespaces metadata,
and turn the result into Copilot-driven GitHub workflow guidance.

## When to Use

- Codespaces start too slowly or cost more than the team expects
- `.devcontainer/` exists and needs trimming, right-sizing, or prebuild tuning
- A team wants guidance on machine sizing, idle timeout, or prebuild scope
- The repository is onboarding Codespaces for the first time and needs a minimal baseline

## When NOT to Use

| Instead of github-codespaces-efficiency | Use |
|-----------------------------------------|-----|
| Debugging a failing GitHub Actions run | `actions-debugging` |
| Reviewing PR lifecycle and checks | `github-pr-workflow` |
| General local development environment setup without Codespaces | ordinary repo setup guidance |

## Prerequisites

- Access to `.devcontainer/` when it exists
- `gh` CLI access if you want live Codespaces or machine data
- Understanding of the team's baseline tooling requirements

## Load Only What You Need

- [`../../../references/github-codespaces-efficiency/codespaces.md`](../../../references/github-codespaces-efficiency/codespaces.md) - audit order, preferred fix order, safe-change rules, and reporting focus
- [`../../../references/github-codespaces-efficiency/review-rubric.md`](../../../references/github-codespaces-efficiency/review-rubric.md) - compact rubric for review passes

If no `.devcontainer/` exists yet, start with `codespaces.md` and define a minimal baseline
before optimizing.

## Core Workflow

### 1. Measure first

```powershell
Get-ChildItem .devcontainer -Recurse -File | Select-Object -ExpandProperty FullName
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, continue with static analysis of
`.devcontainer/` files and mark machine-type or prebuild recommendations as unverified.

Look for:

- devcontainer image larger than the task justifies
- too many features, packages, or extensions
- machine types larger than usage patterns support
- missing `devcontainer-lock.json`
- prebuilds scoped too broadly
- idle timeout guidance mismatched to actual usage

### 2. Apply guardrails

1. Do not remove tools the team uses every day.
2. Do not assume smaller is always better; balance cost against developer throughput.
3. Do not turn the devcontainer into a production image unless the team explicitly needs it.
4. Prefer incremental changes for existing configs; a greenfield reset is for missing configs, not stable ones.
5. Split repo-editable changes from org-level or user-level Codespaces settings.

### 3. Select the top 3 fixes

Rank by expected monthly savings or startup-time improvement:

1. trim the devcontainer
2. right-size the machine type
3. scope prebuilds to sustained-usage branches
4. tune idle timeout
5. remove unused extensions or port-forwarding rules
6. reduce image size and improve layer caching

Keep only evidence-backed, guardrail-safe recommendations. Return up to three.

### 4. Verify

- Start a test Codespace when possible and confirm that devcontainer changes still build and boot correctly.
- Validate machine sizing against observed usage when telemetry exists; otherwise mark it as an assumption.
- Treat startup or build regressions as real bugs even if the configuration looks "cleaner" on paper.

## Required Output

1. **Waste sources** - top startup-time or cost drivers
2. **Proposed fixes** - up to 3 recommendations backed by audit evidence
3. **Validation** - live, static-only, and unverified areas
4. **Impact** - expected versus measured startup time, spend, and utilization

## Tips

- Optimize the slowest, most common developer path first
- Separate startup-time wins from steady-state cost wins
- Prefer documentation changes when the real control lives outside the repository
- Keep prebuild recommendations tight and usage-based

## See Also

- [`github-pr-workflow`](../github-pr-workflow/SKILL.md) - manage GitHub pull requests and related checks
- [`actions-debugging`](../actions-debugging/SKILL.md) - debug workflow failures that block Codespaces-related changes
- [`using-git-worktrees`](../../workflow/using-git-worktrees/SKILL.md) - isolate risky environment changes in a separate checkout

Related Skills

github-actions-efficiency

8
from drvoss/everything-copilot-cli

Use when auditing GitHub Actions workflows for efficiency — reducing CI minutes, cutting costs, eliminating redundant runs, or optimizing caching and concurrency.

fix-github-issue

8
from drvoss/everything-copilot-cli

Use when you have a GitHub Issue number or link and want it resolved end-to-end — reads the issue, locates the bug, applies a fix, writes tests, and opens a PR from the terminal.

github-pr-workflow

8
from drvoss/everything-copilot-cli

Use when creating, updating, or managing pull requests — automates the full PR lifecycle (open, review requests, labels, merge) via GitHub MCP

github-issue-triage

8
from drvoss/everything-copilot-cli

Use when you have a backlog of unorganized GitHub Issues — bulk-reads, labels, prioritizes, and assigns issues at scale using Copilot's built-in GitHub MCP tools.

github-code-search

8
from drvoss/everything-copilot-cli

Use when you need real-world implementation examples or cross-repository context — search GitHub's global code index with the built-in MCP tools and reuse the results as grounded context.

verification-before-completion

8
from drvoss/everything-copilot-cli

Use before claiming any task is done — run the exact command that proves the fix works, read the output, and only then report success.

using-git-worktrees

8
from drvoss/everything-copilot-cli

Use when you need multiple branches checked out at once — create isolated working directories for parallel development without cloning the repository repeatedly

triage

8
from drvoss/everything-copilot-cli

Use when a single issue needs structured triage — classify it, reproduce if needed, request missing information, and leave a durable brief or close-out note in the tracker.

to-issues

8
from drvoss/everything-copilot-cli

Use when a plan, spec, or PRD must become an actionable backlog — break it into thin dependency-aware issues that each deliver a verifiable vertical slice

sprint-workflow

8
from drvoss/everything-copilot-cli

Use when starting a new feature, refactor, or multi-step dev task — runs the full sprint cycle (Think → Plan → Build → Review → Test → Ship → Monitor) using Copilot CLI's plan/autopilot modes.

sprint-retro

8
from drvoss/everything-copilot-cli

Use at the end of a sprint to run a data-driven retrospective — analyzes session history and git metrics to surface what shipped, what slowed you down, and concrete improvements.

security-audit

8
from drvoss/everything-copilot-cli

Use when a codebase needs a formal security audit beyond a quick scan — applies OWASP Top 10 and STRIDE threat modeling from a CSO perspective to surface systemic vulnerabilities.