hlx-admin-api-executor
Skill1 starsChanged 2 months agoApache-2.0View on GitHub
Interactive AEM Edge Delivery Services (EDS/Helix 5) Admin API executor with human-in-the-loop oversight. Use when working with the AEM Admin API (admin.hlx.page) to: (1) Plan and execute admin operations step-by-step (preview, publish, config, access, cache, index, snapshots, code), (2) Execute ONE API request at a time with human review and approval, (3) Document all requests/responses in EXECUTION.md with full traceability, (4) Follow GET/SET/GET verification patterns for safe configuration changes, (5) Resume existing executions and add new steps, (6) Manage site configuration, access control, content operations, and code deployments. For careful AEM admin operations where mistakes are costly - NOT for bulk automation.
- Reads credentials
In this repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ai-knowledge-harvesterSkill
- branded-pptxSkill
- chat-conversation-loggerSkill
- competing-pr-triageSkill
- conversation-loggerSkill
- drawioSkill
- excalidrawSkill
- jack-git-commitSkill
- playwright-demo-videoSkill
- podcast-slides-videoSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 9 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
New: No existing EXECUTION.md. Follow Phases 1-4.
- Distinctive: line 21
When resuming, never overwrite existing steps.
- Very specific: line 33
Verify: GET https://admin.hlx.page/profile with X-Auth-Token header.
- Very specific: line 35
Site tokens: use a different header: Authorization: token hlx_...
- Very specific: line 70
Version tracking: Every config change increments the version.
- Very specific: line 89
Use decimal sub-steps: .1 for request payload, .2 for response.
- Distinctive: line 104
Create EXECUTION.md with steps as TODO.
- Very specific: line 111
Create .env-setup.sh with all needed variables.
- Distinctive: line 138
Wait for explicit "Yes" before executing
- Distinctive: line 139
Never inline request body in approval prompt
- Very specific: line 141
On failure: If a POST/PUT/DELETE returns a non-2xx status, do NOT automatically retry or fix the request.
- Distinctive: line 145
Wait for explicit human approval before executing the corrected request
- Distinctive: line 185
Update EXECUTION.md after each step:
- Distinctive: line 188
Check off validation items
- Distinctive: line 195
GET after: - Verify persistence, wait for user
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
HLX Admin API Executor
Execute AEM Edge Delivery Services (Helix 5) Admin API workflows with interactive planning, human-in-the-loop approval, and full request/response documentation. One operation at a time for careful admin work.
Execution Philosophy
Single-Step Execution: Execute ONE operation at a time with full human oversight. Each step is planned, executed individually, verified, and documented. This is for serious admin operations where mistakes are costly.
Mode Selection
Determine mode first:
- New: No existing EXECUTION.md. Follow Phases 1-4.
- Resume: Existing EXECUTION.md provided. Read it, identify last completed step, ask what to do next (continue / add step / retry / verify).
When resuming, never overwrite existing steps. Append with correct numbering. Preserve all previous files.
Authentication
Header: X-Auth-Token: ${AUTH_TOKEN}
Obtain token:
- Open
https://admin.hlx.page/login/{ORG}/{SITE}/{REF}in browser - Extract
auth_tokencookie from DevTools > Application > Cookies - Save to
local-only/auth-token.sh - TTL: ~7200 seconds (2 hours)
Verify: GET https://admin.hlx.page/profile with X-Auth-Token header.
Site tokens use a different header: Authorization: token hlx_... (not X-Auth-Token).
Sites authored in Document Authoring (da.live, Experience Workspace) also accept an Adobe IMS access token: Authorization: Bearer ${IMS_TOKEN}, no DevTools needed. The da-auth skill in Adobe's aem-edge-delivery-services plugin gets one. Checked on status, preview, publish and the site config read.
Hosts: admin.hlx.page (the paths below), and api.aem.live with the org/sites path form (https://api.aem.live/{ORG}/sites/{SITE}/status/{PATH}).
Environment Variables
export BASE_URL="https://admin.hlx.page"
export ORG="my-org" # GitHub organization
export SITE="my-site" # Site identifier
export REPO="my-repo" # Code repository
export REF="main" # Git branchURL Patterns
| Environment | Pattern |
| Admin API | https://admin.hlx.page/... |
| Preview | https://{REF}--{SITE}--{ORG}.aem.page/{path} |
| Live | https://{REF}--{SITE}--{ORG}.aem.live/{path} |
Endpoint Reference
For the full endpoint catalog with parameters, response schemas, and job polling details, read references/endpoints.md.
Critical Quirks
- POST overwrites entire config: Access endpoints (
access/admin.json,access/site.json, etc.) replace the entire config on POST. Always GET first, merge changes, then POST the complete payload. - Single user per POST:
/config/{ORG}/users.jsonaccepts one user object only. Array payloads return 400. - Site token shown once:
POST /config/{ORG}/sites/{SITE}/secrets.jsonreturns the token value only on creation. Record immediately. - Bulk ops return 202: Preview/publish/index bulk operations return 202 with a job URL. Poll
GET /job/{ORG}/{SITE}/{REF}/{topic}/{jobName}untilstateiscompletedorfailed. - Config auto-reset risk: AEM technical accounts may push config during bulk operations from AEM Sites Console, reverting changes. Verify config after bulk operations.
- Version tracking: Every config change increments the version. Use
/config/{ORG}/sites/{SITE}/versions/{N}.jsonfor auditing or recovery. - Rate limits: 429 responses when exceeded. Content source operations (preview with
?edit=auto) are subject to SharePoint/Google Docs rate limits (503 on timeout).
Folder Structure
{site-or-project}/
└── YYYY-MM-DD-description/
├── EXECUTION.md
├── .env-setup.sh
└── execution-files/
├── step-1.1-get-description-response.json
├── step-2.1-set-description-request.json
├── step-2.2-set-description-response.json
└── step-3.1-get-verify-description-response.jsonStep Numbering
Use decimal sub-steps: .1 for request payload, .2 for response. GET-only steps have one sub-step (.1 for response).
Workflow
Phase 1: Planning
Ask:
- What's the goal?
- What org/site/ref?
- What resources are involved?
- What's the sequence? Suggest GET/SET/GET pattern.
- Where to save files? Suggest
YYYY-MM-DD-description/.
Phase 2: Generate Plan
Create EXECUTION.md with steps as TODO. Each step includes:
- OBJECTIVE: What it accomplishes
- Endpoint: Full URL with method
- Command: Complete curl using env vars and
@filereferences - Acceptance Criteria: What success looks like
- Validation: Checkbox list
Create .env-setup.sh with all needed variables. Show plan for approval.
Phase 3: Execution
Execute ONE step at a time. Wait for user confirmation between steps.
GET Requests
source .env-setup.sh
HTTP_STATUS=$(curl -s --request GET \
--url "${BASE_URL}/config/${ORG}/sites/${SITE}.json" \
--header "X-Auth-Token: ${AUTH_TOKEN}" \
-o execution-files/step-1.1-get-site-config-response.json \
-w "%{http_code}")
echo "HTTP Status: ${HTTP_STATUS}"
cat execution-files/step-1.1-get-site-config-response.json | jqPOST/PUT/DELETE (Require Human Review)
Every non-GET request requires human review with a justification block before execution.
- Save request payload to
execution-files/step-N.1-...-request.json - Present the Change Justification block (see format below)
- Show curl command referencing
@fileand the file path - Wait for explicit "Yes" before executing
- Never inline request body in approval prompt
On failure: If a POST/PUT/DELETE returns a non-2xx status, do NOT automatically retry or fix the request. Instead:
- Report the failure (status code, response body) to the user
- Investigate the root cause (wrong content type, malformed payload, missing fields, etc.)
- Present the proposed fix as a new Change Justification block with WHY/WHAT/HOW
- Wait for explicit human approval before executing the corrected request
This applies even when the fix is obvious. The human must review every mutation attempt.
Approval format with justification:
## Change Review: Step N — [Description]
### WHY
Why is this change needed? What problem does it solve or what goal does it advance?
### WHAT
What exactly is being changed? Describe the before → after state.
Reference the current state from the preceding GET step.
### HOW
How is the change applied? Which endpoint, method, and payload fields are involved?
Call out any side effects (e.g., "POST replaces entire config — all existing fields preserved").
---
Endpoint: POST https://admin.hlx.page/config/{ORG}/sites/{SITE}/access/admin.json
Request payload saved to:
execution-files/step-N.1-set-access-admin-request.json
Command:
curl -s --request POST \
--url "${BASE_URL}/config/${ORG}/sites/${SITE}/access/admin.json" \
--header "Content-Type: application/json" \
--header "X-Auth-Token: ${AUTH_TOKEN}" \
--data @execution-files/step-N.1-set-access-admin-request.json \
-o execution-files/step-N.2-set-access-admin-response.json \
-w "%{http_code}"
Ready to execute? (Yes / No / Modify)Phase 4: Documentation
Update EXECUTION.md after each step:
- Mark completed steps with
✅ COMPLETED - Record HTTP status and key findings under Result
- Check off validation items
GET/SET/GET Pattern
For every modification, execute in sequence, one step at a time:
- GET before - Capture current state, wait for user
- SET - Apply the change, wait for user
- GET after - Verify persistence, wait for user
Never execute multiple steps without user confirmation between them.
curl Conventions
${ENV_VARS}- never hardcode values-sfor silent mode--request METHODexplicit method--data @filefor request bodies (never inline in curl)-o execution-files/step-N.N-description.jsonfor output-w "%{http_code}"to capture status- Pipe to
jqfor display
Roles Reference
| Role | Purpose |
config_admin | Technical account for API automation |
author | Preview, Sidekick, Universal Editor (no publish) |
publish | All author permissions + publish to live |
Templates
- Execution log: See assets/execution-template.md
- Auth token: See assets/auth-token-template.sh
- Env setup: See assets/env-setup-template.sh
- Gitignore: See assets/gitignore-template
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.

