Skip to content

Commit 6804373

Browse files
stefanjudisCopilot
andauthored
feat: add README documentation for monitoring agent skill (#1212)
* feat: add README documentation for monitoring agent skill Add README.md files documenting the monitoring agent skill for the Agent Skills release. The skill enables AI agents to create and manage Checkly monitoring resources. - Rename compile-ai-context to prepare-ai-context for clarity - Add README to skills/monitoring/ for public skill consumption - Add source README to packages/cli/src/ai-context/ for build process * Update skills/monitoring/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update packages/cli/src/ai-context/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * refactor: update log messages in prepare-ai-context script Use clearer, more accurate terminology in console output. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 2b5c99c commit 6804373

4 files changed

Lines changed: 99 additions & 7 deletions

File tree

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"clean:gen": "rimraf ./gen",
1919
"clean": "npm run clean:dist && npm run clean:gen",
2020
"prepack": "npx oclif manifest",
21-
"generate:ai-context": "cross-env CHECKLY_SKIP_AUTH=1 CHECKLY_CLI_VERSION=99.0.0 ./bin/run import plan --root gen --debug-import-plan-input-file ./src/ai-context/context.fixtures.json && ts-node ./scripts/compile-ai-context.ts",
21+
"prepare:ai-context": "cross-env CHECKLY_SKIP_AUTH=1 CHECKLY_CLI_VERSION=99.0.0 ./bin/run import plan --root gen --debug-import-plan-input-file ./src/ai-context/context.fixtures.json && ts-node ./scripts/prepare-ai-context.ts",
2222
"prepare:dist": "tsc --build",
23-
"prepare": "npm run clean && npm run prepare:dist && npm run generate:ai-context",
23+
"prepare": "npm run clean && npm run prepare:dist && npm run prepare:ai-context",
2424
"test": "vitest",
2525
"test:e2e": "npm run prepare && cross-env NODE_CONFIG_DIR=./e2e/config vitest -c ./vitest.config.e2e.mts",
2626
"test:e2e:local": "cross-env CHECKLY_BASE_URL=http://localhost:3000 CHECKLY_ENV=local npm run test:e2e",

packages/cli/scripts/compile-ai-context.ts renamed to packages/cli/scripts/prepare-ai-context.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const CONTEXT_TEMPLATE_PATH = join(
99
)
1010
const RULES_OUTPUT_DIR = join(__dirname, '../dist/ai-context')
1111
const SKILL_OUTPUT_DIR = join(__dirname, '../dist/ai-context/skills/monitoring')
12+
const README_PATH = join(__dirname, '../src/ai-context/README.md')
1213

1314
function stripYamlFrontmatter (content: string): string {
1415
const frontmatterRegex = /^---\r?\n[\s\S]*?\r?\n---\r?\n+/
@@ -20,13 +21,13 @@ async function writeOutput (content: string, dir: string, filename: string): Pro
2021
const outputPath = join(dir, filename)
2122
await writeFile(outputPath, content, 'utf8')
2223
// eslint-disable-next-line no-console
23-
console.log(`✅ Compiled to ${outputPath}`)
24+
console.log(`✅ Wrote ${outputPath}`)
2425
}
2526

26-
async function compileContext () {
27+
async function prepareContext () {
2728
try {
2829
// eslint-disable-next-line no-console
29-
console.log('📝 Compiling context template with examples...')
30+
console.log('📝 Preparing AI context...')
3031

3132
let content = await readFile(CONTEXT_TEMPLATE_PATH, 'utf8')
3233
const examples = await readExampleCode()
@@ -41,9 +42,12 @@ async function compileContext () {
4142
RULES_OUTPUT_DIR,
4243
'checkly.rules.md',
4344
)
45+
46+
const readme = await readFile(README_PATH, 'utf8')
47+
await writeOutput(readme, SKILL_OUTPUT_DIR, 'README.md')
4448
} catch (error) {
4549
// eslint-disable-next-line no-console
46-
console.error('❌ Failed to compile context:', error)
50+
console.error('❌ Failed to prepare AI context:', error)
4751
process.exit(1)
4852
}
4953
}
@@ -82,4 +86,4 @@ async function readExampleCode (): Promise<
8286
return examples
8387
}
8488

85-
compileContext()
89+
prepareContext()
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Checkly CLI Monitoring Agent Skill
2+
3+
This directory contains the agent skill for creating and managing end-to-end testing, monitoring, & observability with an AI-native workflow using Checkly.
4+
5+
## Structure
6+
7+
```
8+
skills/
9+
└── monitoring/
10+
├── README.md # Documentation about the skill
11+
└── SKILL.md # Main skill instructions
12+
```
13+
14+
## What is an Agent Skill?
15+
16+
Agent Skills are a standardized format for giving AI agents specialized knowledge and workflows. This skill teaches agents how to:
17+
18+
- Create and manage API checks, Browser Checks, URL monitors, and other monitors
19+
- Set up Playwright-based Browser and Multistep checks and Playwright Check Suites
20+
- Configure Heartbeat Monitors for cron jobs and scheduled tasks
21+
- Define alert channels (email, Slack, phone, webhooks, etc.)
22+
- Build dashboards and status pages
23+
- Follow monitoring-as-code best practices with the Checkly CLI
24+
25+
## Using This Skill
26+
27+
AI agents can load this skill to gain expertise in Checkly monitoring. The skill follows the [Agent Skills specification](https://agentskills.io) with:
28+
29+
- **SKILL.md**: Core instructions loaded when the skill is activated
30+
31+
## Progressive Disclosure
32+
33+
The skill is structured for efficient context usage:
34+
35+
1. **Metadata** (~80 tokens): Name and description in frontmatter
36+
2. **Core Instructions** (~4.5K tokens): Main SKILL.md content with construct examples
37+
38+
Agents load what they need for each task.
39+
40+
## Learn More
41+
42+
- [Checkly CLI Documentation](https://www.checklyhq.com/docs/cli/overview/)
43+
- [Checkly Constructs Reference](https://www.checklyhq.com/docs/constructs/overview/)
44+
- [Agent Skills Specification](https://agentskills.io/specification.md)

skills/monitoring/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Checkly CLI Monitoring Agent Skill
2+
3+
This directory contains the agent skill for creating and managing end-to-end testing, monitoring, & observability with an AI-native workflow using Checkly.
4+
5+
## Structure
6+
7+
```
8+
skills/
9+
└── monitoring/
10+
├── README.md # Documentation about the skill
11+
└── SKILL.md # Main skill instructions
12+
```
13+
14+
## What is an Agent Skill?
15+
16+
Agent Skills are a standardized format for giving AI agents specialized knowledge and workflows. This skill teaches agents how to:
17+
18+
- Create and manage API checks, Browser Checks, URL monitors, and other monitors
19+
- Set up Playwright-based Browser and Multistep checks and Playwright Check Suites
20+
- Configure Heartbeat Monitors for cron jobs and scheduled tasks
21+
- Define alert channels (email, Slack, phone, webhooks, etc.)
22+
- Build dashboards and status pages
23+
- Follow monitoring-as-code best practices with the Checkly CLI
24+
25+
## Using This Skill
26+
27+
AI agents can load this skill to gain expertise in Checkly monitoring. The skill follows the [Agent Skills specification](https://agentskills.io) with:
28+
29+
- **SKILL.md**: Core instructions loaded when the skill is activated
30+
31+
## Progressive Disclosure
32+
33+
The skill is structured for efficient context usage:
34+
35+
1. **Metadata** (~80 tokens): Name and description in frontmatter
36+
2. **Core Instructions** (~4.5K tokens): Main SKILL.md content with construct examples
37+
38+
Agents load what they need for each task.
39+
40+
## Learn More
41+
42+
- [Checkly CLI Documentation](https://www.checklyhq.com/docs/cli/overview/)
43+
- [Checkly Constructs Reference](https://www.checklyhq.com/docs/constructs/overview/)
44+
- [Agent Skills Specification](https://agentskills.io/specification.md)

0 commit comments

Comments
 (0)