add-manifest-sample
Skill363 starsChanged 49 days agoMITView on GitHub
Add a new Azure Functions sample/quickstart to the Template Manifest. Use when asked to "add a sample", "add a template", "register a quickstart", or "add a connector/MCP/trigger sample" to Functions.Templates/Template-Manifest/manifest.json. Covers required fields, the short/long description pattern, category rules, priority assignment, signed annotated release tags, metadata bumps (count/version/generatedAt), and keeping docs/priority-tiers.md in sync.
- Commits and pushes
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 4 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 46
Never guess what a sample does.
- Distinctive: line 67
If a tag is missing, lightweight, or unsigned, create a new signed annotated tag at the verified commit.
- Distinctive: line 83
Stop and report missing access, signing/verification failures, or repository rule blocks.
- Very specific: line 109
Before adding the entry, search templates for a matching id.
- Very specific: line 167
If the sample is not azd-based (for example, iac is none or deployment is manual), omit the deployed via azd suffix.
- Very specific: line 172
longDescription: start with the imperative - Very specific: line 224
Use this lookup style to avoid inferring block math from memory.
- Very specific: line 232
If the target resource/block is unclear or overlaps with existing assignments, stop and confirm the intended block with the user before …
- Distinctive: line 253
Keep the doc in sync with the manifest:
- Distinctive: line 255
Update the header Total templates and Manifest version.
- Very specific: line 256
Add the new row(s) to the Full template listing (use *new* in the *Was* column), in priority → language order.
- Very specific: line 258
Update the Priority block map and Coverage matrix if you added a sub-type/category, and the Summary counts and Total (must match …
- Very specific: line 261
If samples are removed (e.g.
- Very specific: line 285
Run the repo's reference validator, which checks that every template's repositoryUrl, gitRef, and folderPath resolve and tag signatures …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add a new sample to the Template Manifest
This skill explains how to register a new template in the Azure Functions Template Manifest so it appears in the VS Code Azure Functions extension and other consumers.
Who consumes the manifest
Changes to manifest.json are surfaced by multiple downstream consumers, so keep
entries accurate and validated:
- Azure Functions VS Code Extension — shows templates (and their
categories) in the create-project / create-sample experience. - Azure Functions CLI (Core Tools) v5 — quickstart command uses the manifest to list and scaffold samples.
- Azure MCP tool — exposes the manifest's templates to MCP clients/agents in Azure Functions Tools.
- Azure skills — Copilot/agent skills that read the manifest to recommend or generate Functions samples (entry point Azure MCP Tool)
Files you will touch
| File | Purpose |
Functions.Templates/Template-Manifest/manifest.json | Source of truth. Add the template object + bump metadata. |
Functions.Templates/Template-Manifest/schemas/manifest.schema.json | JSON Schema. Only edit to add a new enum value (e.g. a new resource). Note: categories are not a schema enum — they are free-form kebab-case (pattern-validated), so adding a category needs no schema change. |
Functions.Templates/Template-Manifest/docs/priority-tiers.md | Human-readable priority/coverage doc. Keep in sync with the manifest. |
The manifest file is written as canonical json.dumps(indent=2, ensure_ascii=False)
output with a trailing newline. Preserve that formatting (2-space indent, no
trailing whitespace).
Step 1 — Inspect the source repository first
Never guess what a sample does. Inspect the actual repo at the exact tag you will
pin (gitRef) and confirm:
- The folder (
folderPath) and tag (gitRef) exist, and the tag ref'sobject.typeistag(annotated), notcommit(lightweight). GitHub must also reportverification.verified: truefor the tag object's signature. - The real trigger/function names.
- Whether it actually uses a binding you plan to mention. For example, only claim
"Blob output" if the code really has a Blob output binding — sibling samples in
different languages often differ (e.g. C# may use
BlobOutputwhile the TypeScript/Python ports only log the payload).
gh api "repos/<owner>/<repo>/contents/<folderPath>?ref=refs/tags/<tag>" --jq '.[] | "\(.type)\t\(.name)"'
gh api "repos/<owner>/<repo>/git/refs/tags/<tag>" --jq '.object.type'
$tagObjectSha = gh api "repos/<owner>/<repo>/git/refs/tags/<tag>" --jq '.object.sha'
gh api "repos/<owner>/<repo>/git/tags/$tagObjectSha" --jq '{commit: .object.sha, verified: .verification.verified, reason: .verification.reason}'Create signed annotated tags only
If a tag is missing, lightweight, or unsigned, create a new signed annotated
tag at the verified commit. Check for newer main commits and confirm with the
user before including them. Choose an unused release version; never overwrite
existing tags. Run from the source repository checkout:
git fetch origin main --tags
git tag -s <new-tag> <verified-commit-sha> -m "Release <new-tag>"
git verify-tag <new-tag>
git push origin refs/tags/<new-tag>Re-run the API checks above for the new tag: its target must match the approved
commit and its signature must verify on GitHub. For SSH signature verification,
configure gpg.ssh.allowedSignersFile with the trusted public signing key.
Stop and report missing access, signing/verification failures, or repository rule blocks. Never fall back to unsigned/lightweight tags or branches, bypass rules, or rewrite history.
Step 2 — Add the template object
Insert the template object adjacent to its peer entries (same resource value)
in the templates array, maintaining priority order within that group. If no
peers exist, append to the end of the array. Mirror the existing entry for the
same family/resource so the new one is consistent.
Mandatory fields for a new sample
A new template must include all of the following.
Enforced by the schema:
id, displayName, shortDescription, longDescription, language, bindingType, resource,
iac, priority, categories, repositoryUrl, folderPath, gitRef.
Other fields (whatsIncluded, author, isHighlighted) are
optional but recommended where applicable. tags is deprecated — do not add it.
Field rules
id— kebab-case, unique (matches the schemaidpattern). Convention:<resource-or-feature>-<binding>-<language>(e.g.office365-connector-trigger-python). Before adding the entry, searchtemplatesfor a matchingid. If a collision is found, inform the user and suggest an alternativeid(for example, append a version suffix or disambiguating term). Never silently overwrite or duplicate anid.displayName—"<Friendly Name> (<Lang> + AZD + Bicep)".language— must be one of the schemalanguageenum values.bindingType— must be one of the schemabindingTypeenum values.resource— must be one of the schemaresourceenum values. Add a new enum value tomanifest.schema.jsononly if none fits, and reuse it consistently.iac— must be one of the schemaiacenum values.- The same enum-extension rule applies to
language,bindingType, andiac: add a new enum value inmanifest.schema.jsononly when no existing value fits, then reuse it consistently across related samples. When any enum is extended, bump manifestversionwith a minor increment. repositoryUrl— must satisfy the schema pattern (GitHub HTTPS URL).folderPath— path within the repo (.for root).gitRef— mandatory for new samples. Always pin a signed annotated release tag, e.g.refs/tags/v1.0.0, not a moving branch. Verify or create the tag using Step 1 before adding the template. When the source repo ships a new release, ask the user to updategitRefand re-verify the pinnedfolderPath/contents.
The allowed values, patterns, and limits for every field are defined in
schemas/manifest.schema.json — read them there rather than relying on a copy.
Categories (match existing — shown in VS Code)
categories are displayed/filtered in the VS Code extension, so only use
categories that already exist in the manifest unless you have a deliberate reason
to introduce a new one. Derive the current set from the manifest instead of
hardcoding it:
cd Functions.Templates\Template-Manifest
@'
import json
d = json.load(open("manifest.json", encoding="utf-8"))
print(sorted({c for t in d["templates"] for c in t["categories"]}))
'@ | python -Most starter samples include starters plus a domain category
(e.g. ["starters", "connectors", "event-processing"]). Values are kebab-case.
tags are deprecated
Do not add a tags array to new entries. It is deprecated and not used by
consumers. (Older entries may still contain it; leave those as-is unless asked.)
Description pattern
Match the established pattern used across the manifest:
shortDescription(respect the schema'smaxLength): a concise capability summary that ends withdeployed via azdfor azd-based templates. Pattern:"<Service> <scope> <mechanism>, deployed via azd". Example:"Office 365 Outlook email and calendar connector triggers with Blob output, deployed via azd". If the sample is not azd-based (for example,iacisnoneor deployment is manual), omit thedeployed via azdsuffix. End with the real deployment mechanism (for example,deployed via ARM template) or with the capability summary when no deployment mechanism is represented.longDescription: start with the imperativeBuild and deploy …, then explicitly name the trigger(s) and binding(s) the sample demonstrates — e.g. the specific trigger type(s) (ConnectorTrigger,McpToolTrigger,CosmosDBTrigger, …) and any input/output bindings (BlobInput/BlobOutput, etc.). Enumerate(1) … (2) …when there are multiple functions/tools, naming each one. Only list a binding if the sample's code actually uses it (verify per language — siblings often differ). Then name the SDK/extension, give the hosting/auth summary, and end withDeployed with azd.For non-azd samples, omit theDeployed with azd.closing and end with the deployment approach actually used or a neutral capability summary.whatsIncluded: a short list of concrete artifacts (functions, bindings, infra, azd config). Keep claims accurate to the real sample.
Example object
{
"id": "office365-connector-trigger-python",
"displayName": "Office 365 Outlook Connector Triggers (Python + AZD + Bicep)",
"shortDescription": "Office 365 Outlook email and calendar connector triggers, deployed via azd",
"longDescription": "Build and deploy an Office 365 Outlook connector app on Azure Functions in Python. This app provides five connector trigger functions ... Deployed with azd.",
"language": "Python",
"bindingType": "trigger",
"resource": "connector",
"iac": "bicep",
"priority": 80,
"categories": ["starters", "connectors", "event-processing"],
"author": "Azure Functions Team",
"repositoryUrl": "https://github.com/Azure-Samples/functions-connectors-python",
"folderPath": "office365App",
"gitRef": "refs/tags/v1.0.0",
"whatsIncluded": ["..."]
}isHighlighted: true is optional and only for samples that should be
featured/highlighted in the consuming UI (e.g. VS Code).
Step 3 — Choose a priority
priority is the primary sort key (lower = shown first), an integer within the
range defined by the schema's priority bounds. It is organized in blocks (see
docs/priority-tiers.md):
- 5-slot blocks per Azure resource:
+0trigger,+1input,+2output,+3variant,+4stub. - 10-slot block for MCP (P50–59).
- Language samples that share a sub-type share the same priority and are sorted by language order: .NET → Python → TypeScript → JavaScript → Java → PowerShell.
Use this lookup style to avoid inferring block math from memory. Build/update this
table from docs/priority-tiers.md before assigning a new value:
| Resource | Block Start | trigger | input | output | variant |
| mcp | 50 | 50 | 51 | 52 | 53 |
| connector | 80 | 80 | 81 | 82 | 83 |
If the target resource/block is unclear or overlaps with existing assignments,
stop and confirm the intended block with the user before setting priority.
Reuse the priority of the matching peer template (e.g. all Office 365 connector samples = P80, all SharePoint = P81). Use the next free slot/block for a brand-new category.
Step 4 — Bump manifest metadata
In manifest.json, update the top-level fields:
totalTemplates— must equal the number of objects intemplates.version— bump minor (e.g.1.2.0→1.3.0) for new templates or enum values (resource,language,bindingType,iac). Bump patch (e.g.1.2.0→1.2.1) for description/metadata fixes, includinggitRefupdates, without adding/removing templates or extending enums. If both apply, use the higher bump (minor).generatedAt— current UTC time inYYYY-MM-DDTHH:MM:SSZ.
Step 5 — Update docs/priority-tiers.md
Keep the doc in sync with the manifest:
- Update the header Total templates and Manifest version.
- Add the new row(s) to the Full template listing (use
*new*in the Was column), in priority → language order. - Update the Priority block map and Coverage matrix if you added a
sub-type/category, and the Summary counts and Total (must match
totalTemplates). - If samples are removed (e.g. archived repos), delete their rows and note the
removal in the block map / coverage matrix (e.g.
*(removed — repos archived)*).
Step 6 — Validate
Validate schema, counts, and canonical formatting. For large edits, check
formatting before and after. Install jsonschema only if missing:
cd Functions.Templates\Template-Manifest
@'
import json, jsonschema
orig = open("manifest.json", encoding="utf-8").read()
d = json.loads(orig)
s = json.load(open(r"schemas\manifest.schema.json", encoding="utf-8"))
jsonschema.validate(d, s)
assert d["totalTemplates"] == len(d["templates"]), "totalTemplates mismatch"
assert orig == json.dumps(d, indent=2, ensure_ascii=False) + "\n"
print("OK:", len(d["templates"]), "templates, version", d["version"])
'@ | python -Validate template references on GitHub
Run the repo's reference validator, which checks that every template's
repositoryUrl, gitRef, and folderPath resolve and tag signatures verify on
GitHub. It rejects lightweight/unsigned tags and warns for legacy branch refs.
Requires an authenticated gh CLI:
pwsh -NoProfile -File eng\scripts\validate-manifest-refs.ps1The script validates the whole manifest, so pre-existing refs/heads/* branch
entries may already emit warnings. For the sample(s) you added or changed, the
output must show OK with no WARN/ERROR lines. Fix any error and re-run
until your entries are clean before committing.
Checklist
- Verified repo,
folderPath, andgitRef(tag) exist; claims match real code. gitRefpins a verified signed tag; newly created tags usegit tag -s.- Template object added with all mandatory fields (incl.
gitRef);idunique. displayNamefollows"<Friendly Name> (<Lang> + AZD + Bicep)".categoriesuse only existing values; notagson new entries.shortDescriptionfollows deployment mode rules: for azd templates it ends withdeployed via azd; for non-azd templates it omits that suffix and uses the actual deployment mechanism (or a capability-only ending).longDescriptionstarts withBuild and deploy …, explicitly names the trigger(s)/binding(s) demonstrated; for azd templates it ends withDeployed with azd., and for non-azd templates it omits that closing and uses the actual deployment approach (or a neutral capability summary).prioritymatches peers / correct block.totalTemplates,version,generatedAtupdated.docs/priority-tiers.mdlisting, block map, coverage matrix, and totals updated.- JSON parses, schema validates, counts match; no formatting drift (round-trip).
eng\scripts\validate-manifest-refs.ps1showsOK(noWARN/ERROR) for the sample(s) you touched.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

