setup
/setup
Set up New Relic Preflight observability for Kiro — verify the preflight/preflight-collector binaries are installed, wire up hook-based tool-call capture, and choose local vs. cloud mode. Use right after this power connects for the first time, or whenever the user asks to set up, configure, or troubleshoot Preflight.
- Author
- newrelic-experimental ↗
- Repository
- preflight ↗
- Licence
- Apache-2.0
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 1
- HTML comments
- 0
- URLs in SKILL.md
- 5
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
- 1 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/validate-deps.sh
What it does and when to use it
Set up New Relic Preflight observability for Kiro — verify the preflight/preflight-collector binaries are installed, wire up hook-based tool-call capture, and choose local vs. cloud mode. Use right after this power connects for the first time, or whenever the user asks to set up, configure, or troubleshoot Preflight.
Original author description
Set up New Relic Preflight observability for Kiro — verify the preflight/preflight-collector binaries are installed, wire up hook-based tool-call capture, and choose local vs. cloud mode. Use right after this power connects for the first time, or whenever the user asks to set up, configure, or troubleshoot Preflight.
How it works
- Step 1: Confirm the MCP server connected
- Step 2: Wire up full tool-call visibility (hooks)
- Step 3: Ask which mode and credentials
- Step 4: Mention optional feature flags
SKILL.md preview
---
name: setup
description: Set up New Relic Preflight observability for Kiro — verify the
preflight/preflight-collector binaries are installed, wire up hook-based
tool-call capture, and choose local vs. cloud mode. Use right after this
power connects for the first time, or whenever the user asks to set up,
configure, or troubleshoot Preflight.
---
# Setup
Run this once, right after `preflight` connects. Everything here happens
through your own tool calls (shell + `nr_observe_*`) — never ask the user to
open a terminal themselves. Deep troubleshooting detail (session-id
resolution, hook exit-code semantics) lives in `references/troubleshooting.md`
— read it if a step below doesn't behave as expected.
## Step 1: Confirm the MCP server connected
Call `nr_observe_health`. If it errors or the tool isn't available, note that
this power's `mcp.json` launches `preflight` via `npx -y
@newrelic/preflight@latest --stdio` — no global install is required for the
MCP tools themselves, so check that `npx` can resolve on `PATH` and reach the
npm registry rather than looking for a global `preflight` binary. (Step 2's
hook wiring is the part that does need a global install — see below.) Then
ask the user to reconnect MCP servers from the Kiro MCP panel, or restart
Kiro.
## Step 2: Wire up full tool-call visibility (hooks)
Without this step, `preflight` can only see calls routed to its own
`nr_observe_*` MCP tools — it never sees Read/Write/shell/other-MCP-server
calls. Kiro has a real hook mechanism
([kiro.dev/docs/hooks](https://kiro.dev/docs/hooks)) that fires
`PreToolUse`/`PostToolUse` for every tool call, built-in or MCP — wiring it
up is what makes this power's cost, anti-pattern, and efficiency metrics
reflect the whole session instead of just the `nr_observe_*` calls.
1. **Run `scripts/validate-deps.sh` first, before creating the hook.** A
`PreToolUse` hook can block the tool call it's guarding
([kiro.dev/docs/hooks](https://kiro.dev/docs/hooks) marks `PreToolUse` as
blocking, `PostToolUse` as not) — a hook command that isn't found on
`PATH` would fail every tool call in the user's session, not just skip
Preflight's own observability.
- If the script reports the binary missing, ask the user to run
`npm install -g @newrelic/preflight`, then re-run the script. **Do not
proceed to step 2 until it passes.**
2. Create `.kiro/hooks/preflight-observability.json` in the user's workspace
(not inside this power's own directory — hooks are workspace-scoped):
```json
{
"version": "v1",
"hooks": [
{
"name": "Preflight: pre tool call",
"trigger": "PreToolUse",
"action": { "type": "command", "command": "MCP_CLIENT=kiro preflight-collector" },
"timeout": 10
},
{
"name": "Preflight: post tool call",
"trigger": "PostToolUse",
"action": { "type": "command", "command": "MCP_CLIENT=kiro preflight-collector" },
"timeout": 10
}
]
}
```
`preflight-collector` tells pre- from post-call apart by reading the hook
payload's own `hook_event_name` field on stdin, not by a CLI argument —
the same command works for both entries. Neither hook sets a `matcher`;
per kiro.dev/docs/hooks, omitting it defaults to always-match, so both
fire for every tool name. Leave it that way unless the user explicitly
asks to scope collection down.
3. Verify it's working: make any tool call, then call
`nr_observe_get_session_timeline` and confirm the call shows up.
## Step 3: Ask which mode and credentials
This power's `mcp.json` sets `NR_AI_MODE: "local"` so it works out of the box
with no New Relic account (dashboard at `http://127.0.0.1:7777`, nothing
leaves the machine). Ask the user, conversationally, whether they'd rather
send data to New Relic instead (`cloud`) or do both.
If `cloud` or `both`, ask for their license key and account ID, then edit
this power's own `mcp.json` directly — add `NEW_RELIC_LICENSE_KEY` and
`NEW_RELIC_ACCOUNT_ID` to the same `env` block, and change `NR_AI_MODE` to
`cloud` or `both`. Edit `mcp.json` itself rather than relying on
shell-profile exports: it's literally the config Kiro reads to launch this
server. Never hardcode real credentials into a shared/source-controlled copy
of `mcp.json` — keep it on `local` mode with no credentials there, and only
fill in real values in the user's own local install. Tell the user to fully
quit and relaunch Kiro so the change is picked up, then verify with
`nr_observe_get_config`.
Leave `NEW_RELIC_AI_PLATFORM: "kiro"` in that `env` block alone. Kiro exposes
no ambient environment variable that identifies it, so without this the
platform auto-detection falls through to the generic MCP adapter, Kiro's tool
names are never normalized, and every file/edit/shell metric silently reports
zero while the raw tool-call count still looks correct. Verify with
`nr_observe_get_config` that `platform` reads `kiro`, not `generic-mcp`.
## Step 4: Mention optional feature flags
Once Steps 1-3 are done, briefly let the user know they can add more fields
to that same `mcp.json` `env` block to unlock specific tools — don't ask about
these proactively, just mention they exist:
- `NEW_RELIC_AI_SESSION_BUDGET_USD` / `_DAILY_` / `_WEEKLY_BUDGET_USD` — set a
spend cap so `nr_observe_get_budget_status` reports non-null
`remainingUsd`/`pctUsed` and fires 50/80/100% alerts. Works in `local` mode.
- `NEW_RELIC_AI_TEAM_ID` + `NEW_RELIC_API_KEY` (a NerdGraph **User** key,
`NRAK-...` — distinct from `NEW_RELIC_LICENSE_KEY`) — both are required
before `nr_observe_get_team_summary` will work at all; it errors with
`"teamId or nrApiKey not configured"` otherwise.
Tell the user where to look for more — don't just say "check the docs" without
the link, since they may not have this repo cloned locally:
- Feature-flag table (includes `NEW_RELIC_AI_ORG_ID`/`_PROJECT_ID`/
`_MCP_DEVELOPER` too): https://newrelic-experimental.github.io/preflight/kiro-power/#optional-feature-flags
- Every config field this server reads, env var and config-file key alike:
https://newrelic-experimental.github.io/preflight/advanced/
Do not repeat this setup on every message — only run it once per Kiro
workspace, or when the user explicitly asks to check Preflight's setup.
Files in this package (3)
- SKILL.md 6 KB
- references/troubleshooting.md 4 KB
- scripts/validate-deps.sh 1 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · newrelic-experimental/preflight | 100 | Apache-2.0 |
| HwangSlater/harness-fit | 100 | MIT |
| nesquikm/dev-process-toolkit | 100 | MIT |
| userKael/rastro | 100 | MIT |
| als-apg/osprey | 100 | BSD-3-Clause |
| dedujeong/gemba | 100 | Apache-2.0 |
| eigenwise/eigenwise-toolshed | 100 | MIT |
| awrshift/agent-memory-kit | 100 | MIT |
| lifecycle-innovations-limited/claude-ops | 100 | MIT |
Database snapshot: 13.11.2026 · package version d5917e923994 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100nrsetup
Connects and troubleshoots the New Relic MCP server `newrelic` (OAuth sign-in, EU/JP regions, access errors). Use when the user wants to set up or connect New Relic, when a New Relic request is made but `newrelic` tools are missing from your tool list, or when New Relic tools… - 100new-relic
Set up and manage New Relic for full-stack observability including APM, browser monitoring, infrastructure monitoring, and alerting. Use when a user needs to instrument applications, write NRQL queries, create dashboards, configure alert policies, or integrate New Relic with… - 100verify-preflight
Launch an isolated Preflight instance built from this checkout and prove behavior on its real surfaces (the web dashboard, the dashboard HTTP API, hook capture through the collector, token cost from transcripts, and the stdio MCP tools). Use when shipping or reviewing any… - 100new-relic-webhooks
Receive and authenticate New Relic alert webhooks. Use when setting up a New Relic Webhook destination for workflow notifications, verifying HTTP Basic authentication, debugging 401s, or handling CREATED, ACTIVATED, CLOSED and acknowledged issue notifications from your own payload template. - 90observability
Use when the user asks about AI coding session cost, token usage, efficiency score, anti-patterns (thrashing, re-reading, stuck loops), task completion, budget status, prompt cache health, git workflow efficiency, or wants to query New Relic Preflight's observability data for… - 100manage-kiro-tracing
Set up and configure Arize tracing for Kiro CLI sessions. Use when users want to set up Kiro tracing, configure Arize AX or Phoenix for Kiro, enable/disable tracing, choose or set a default traced agent, or troubleshoot Kiro tracing issues. Triggers on "set up kiro tracing",…