splunk-cli
Skill8 starsChanged 6 months agoApache-2.0View on GitHub
Perform Splunk operations using the Splunk REST API via curl. Use for running search queries, and inspecting saved searches, indexes, and alerts.
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use the instance and rules below when constructing all Splunk API commands.
- Distinctive: line 12
Update the table below with your Splunk instance URLs and credential file paths:
- Distinctive: line 19
If the target instance is unclear, ask the user before running any command.
- Distinctive: line 75
NEVER target any Splunk instance not listed in the instance table above.
- Distinctive: line 76
NEVER print, display, log, or store the contents of any token file.
- Very specific: line 77
Always read the token inline with $(cat <TOKEN_FILE>) — never hardcode a token value in a command.
- Very specific: line 78
Always pass -s (silent) to curl, use output_mode=json, and pipe through jq for readable output.
- Distinctive: line 79
NEVER run DELETE endpoints or index-clean operations without explicit user instruction — these are irreversible.
- Distinctive: line 81
If a saved search name or index name is unfamiliar, look it up with a read-only call first.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
Splunk CLI Skill
Use the instance and rules below when constructing all Splunk API commands.
Instances
Update the table below with your Splunk instance URLs and credential file paths:
| Environment | Base URL | Token File |
| Production | https://<your-splunk-prod-url>:8089 | ~/.splunk/prod.token |
| Staging | https://<your-splunk-staging-url>:8089 | ~/.splunk/staging.token |
If the target instance is unclear, ask the user before running any command.
Prerequisites (one-time setup by user)
Generate a Splunk authentication token (Settings → Tokens) for each instance and save it to the corresponding token file. Never print or display token values. Do not perform these steps yourself.
mkdir -p ~/.splunk && echo "<your-auth-token>" > <TOKEN_FILE> && chmod 600 <TOKEN_FILE>Command Format
curl -s -H "Authorization: Bearer $(cat <TOKEN_FILE>)" \
"<BASE_URL>/services/<endpoint>?output_mode=json" | jq .Available API Endpoints
Read-only (safe, no confirmation needed)
| Endpoint | Method | Description |
/services/search/jobs/export | GET/POST | Run a search query and stream results |
/services/search/jobs/<sid>/results | GET | Get results of a completed search job |
/services/saved/searches | GET | List saved searches |
/services/data/indexes | GET | List indexes |
/services/alerts/fired_alerts | GET | List fired alerts |
/services/server/info | GET | Show server/instance info |
Example — run a search
curl -s -H "Authorization: Bearer $(cat <TOKEN_FILE>)" \
--data-urlencode "search=search index=<index> error | head 20" \
"<BASE_URL>/services/search/jobs/export?output_mode=json" | jq .Mutating operations (confirm with user before running)
| Endpoint | Method | Description |
/services/saved/searches | POST | Create a saved search |
/services/saved/searches/<name> | POST | Update a saved search |
/services/data/indexes | POST | Create a new index |
Never run — requires explicit human approval
| Endpoint | Method | Reason |
/services/saved/searches/<name> | DELETE | Irreversible deletion of a saved search |
/services/data/indexes/<name> | DELETE | Irreversibly deletes an index and its data |
/services/data/indexes/<name> | POST (with clean action) | Irreversibly clears all data from an index |
Rules
- NEVER target any Splunk instance not listed in the instance table above. If a URL references a different host, stop and ask the user to confirm.
- NEVER print, display, log, or store the contents of any token file.
- Always read the token inline with
$(cat <TOKEN_FILE>)— never hardcode a token value in a command. - Always pass
-s(silent) tocurl, useoutput_mode=json, and pipe throughjqfor readable output. - NEVER run DELETE endpoints or index-clean operations without explicit user instruction — these are irreversible.
- For search queries, always set a reasonable time range and
head/| head Nlimit — an unbounded search over a large index can be slow and return excessive data. - If a saved search name or index name is unfamiliar, look it up with a read-only call first.
In this repository54 other files it gives its agents.
- alibabacloud-cliSkill
- ansible-cliSkill
- appdynamics-cliSkill
- argocd-cliSkill
- aws-cliSkill
- aws-cloudwatch-cliSkill
- azure-cliSkill
- bash-lintingSkill
- betterstack-cliSkill
- bitbucket-cliSkill
- chef-cliSkill
- code-reviewSkill
- commit-codeSkill
- create-dockerfileSkill
- create-terraform-helm-upgrade-planSkill
- datadog-cliSkill
- digitalocean-cliSkill
- dockerfile-lintingSkill
- dynatrace-cliSkill
- elasticsearch-cliSkill
- gcp-cliSkill
- github-cliSkill
- gitlab-cliSkill
- go-lintingSkill
- grafana-cliSkill
- grafana-loki-cliSkill
- graylog-cliSkill
- helm-cliSkill
- hetzner-cliSkill
- huaweicloud-cliSkill
- jaeger-cliSkill
- jenkins-cliSkill
- jira-and-confluence-cliSkill
- kibana-cliSkill
- kubernetes-cliSkill
- loggly-cliSkill
- maintenance-check-aws-eksSkill
- maintenance-create-ticket-on-jiraSkill
- ms-teams-cliSkill
- mysql-cliSkill
- newrelic-cliSkill
- oci-cliSkill
- packer-cliSkill
- papertrail-cliSkill
- postgresql-cliSkill
- prometheus-cliSkill
- python-lintingSkill
- rollbar-cliSkill
- salesforce-cliSkill
- sentry-cliSkill
- slack-cliSkill
- terraform-cliSkill
- terraform-lintingSkill
- vault-cliSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

