Project Init
Bootstrap a new smaqit project by generating .github/copilot-instructions.md from the smaqit template.
Steps
Check for existing file
- Check whether
.github/copilot-instructions.mdalready exists. - If it does exist, stop immediately and inform the user:
.github/copilot-instructions.mdalready exists. Aborting to avoid overwriting your project instructions. Delete or rename the existing file and run this skill again if you want to reinitialise. - Do not proceed past this step if the file exists.
- Check whether
Read the template
- Read
.smaqit/templates/copilot-instructions.template.mdin full. - If the template file does not exist, stop and inform the user:
Template not found at
.smaqit/templates/copilot-instructions.template.md. Runsmaqit-extensions initto install the required scaffolding files.
- Read
Assess the repository to infer project details
- Scan the repository to gather as much context as possible without making assumptions. Read in parallel (whichever exist):
README.md— project name, purpose, descriptionCONTRIBUTING.md— conventions, branching strategy, contribution guidelines- Build/dependency manifests:
package.json,go.mod,Cargo.toml,pyproject.toml,pom.xml,build.gradle— tech stack, dependencies, scripts Makefile— build, test, and lint commands; inferred conventions- Any
docs/ordocumentation/index files
- For each
# Projectplaceholder field, derive the value only if the evidence is clear and unambiguous:- Project name — from the root
README.mdtitle,package.json"name", or repository name - Purpose / goal — from the
README.mdintroduction or description section - Tech stack — from manifest files (language runtimes, frameworks, key libraries)
- Key conventions — from
CONTRIBUTING.md, linting config files, or clearly documented patterns - Domain context — from
README.mdordocs/files that describe the business or architectural domain
- Project name — from the root
- If the evidence for a field is absent, ambiguous, or insufficient, leave the original placeholder text exactly as it appears in the template. Do NOT invent or assume values.
- Scan the repository to gather as much context as possible without making assumptions. Read in parallel (whichever exist):
Populate the
# Projectsection- Take the template content from Step 2.
- Replace only the placeholders for which clear evidence was found in Step 3.
- Keep the
# Scaffoldingsection exactly as it appears in the template — do not modify it.
Write the output file
- Write the populated content to
.github/copilot-instructions.md. - Confirm success to the user and list which fields were filled in and which were left as placeholders:
✓
.github/copilot-instructions.mdcreated successfully. Review and commit the file to include it in your project.
- Write the populated content to
Requirements
- Never overwrite an existing
.github/copilot-instructions.md(Step 1 is a hard guard). - The
# Scaffoldingsection must be copied verbatim from the template — it is static and must not be altered. - Never assume or invent values for placeholder fields — only fill in what can be directly inferred from existing repo files.
- Placeholders must remain for any field that cannot be confidently inferred.
- Do not create any additional files beyond
.github/copilot-instructions.md.
Source: ruifrvaz/smaqit-extensions — distributed by TomeVault.