skill-check 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/main.js CHANGED
@@ -605,15 +605,19 @@ async function runAgentScanWithFeedback(scanOptions, target, io, format) {
605
605
  }
606
606
  }
607
607
  function resolveValidationStatus(result) {
608
+ if (result.summary.skillCount === 0)
609
+ return 'SKIPPED';
608
610
  if (result.summary.errorCount > 0)
609
611
  return 'FAIL';
610
612
  if (result.summary.warningCount > 0)
611
613
  return 'WARN';
612
614
  return 'PASS';
613
615
  }
614
- function resolveSecurityStatus(enabled, scanExitCode) {
616
+ function resolveSecurityStatus(enabled, scanExitCode, skillCount) {
615
617
  if (!enabled)
616
618
  return 'SKIPPED';
619
+ if (skillCount === 0)
620
+ return 'SKIPPED';
617
621
  return scanExitCode === 0 ? 'PASS' : 'FAIL';
618
622
  }
619
623
  function computeOverallScore(scores) {
@@ -848,7 +852,7 @@ export async function runCli(argv, io = defaultIO) {
848
852
  affectedFileCount: countAffectedFiles(result.diagnostics),
849
853
  overallScore: computeOverallScore(scores),
850
854
  validationStatus: resolveValidationStatus(result),
851
- securityStatus: resolveSecurityStatus(scanOptions.enabled, scanExitCode),
855
+ securityStatus: resolveSecurityStatus(scanOptions.enabled, scanExitCode, result.summary.skillCount),
852
856
  elapsedMs: performance.now() - checkStartedAt,
853
857
  runCommand,
854
858
  mode: checkOptions.share ? 'share' : 'default',
@@ -857,7 +861,7 @@ export async function runCli(argv, io = defaultIO) {
857
861
  if (conclusion.fullCommandPlain) {
858
862
  io.stdout(`${conclusion.fullCommandPlain}\n`);
859
863
  }
860
- if (checkOptions.share) {
864
+ if (checkOptions.share && result.summary.skillCount > 0) {
861
865
  emitShareStatus(io, 'rendering share image...');
862
866
  const shareOutputPath = path.resolve(process.cwd(), checkOptions.shareOut ?? 'skill-check-share.png');
863
867
  const shareText = conclusion.fullCommandPlain
@@ -1,4 +1,4 @@
1
- export type ValidationStatus = 'PASS' | 'WARN' | 'FAIL';
1
+ export type ValidationStatus = 'PASS' | 'WARN' | 'FAIL' | 'SKIPPED';
2
2
  export type SecurityStatus = 'PASS' | 'FAIL' | 'SKIPPED';
3
3
  export type ConclusionCardMode = 'default' | 'share';
4
4
  export interface ConclusionCardInput {
@@ -55,6 +55,8 @@ function renderValidationStatus(c, status) {
55
55
  return c.green(status);
56
56
  if (status === 'WARN')
57
57
  return c.yellow(status);
58
+ if (status === 'SKIPPED')
59
+ return c.dim(status);
58
60
  return c.red(status);
59
61
  }
60
62
  function renderSecurityStatus(c, status) {
@@ -1,4 +1,4 @@
1
- export const DEFAULT_INCLUDE = ['**/skills/*/SKILL.md'];
1
+ export const DEFAULT_INCLUDE = ['**/SKILL.md'];
2
2
  export const DEFAULT_EXCLUDE = [
3
3
  '**/node_modules/**',
4
4
  '**/.git/**',
@@ -1,11 +1,8 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import fg from 'fast-glob';
4
- import { DEFAULT_INCLUDE } from './defaults.js';
5
4
  export async function discoverSkillFiles(config) {
6
5
  const found = new Set();
7
- const usesDefaultInclude = config.include.length === DEFAULT_INCLUDE.length &&
8
- config.include.every((pattern, index) => pattern === DEFAULT_INCLUDE[index]);
9
6
  for (const root of config.rootsAbs) {
10
7
  if (fs.existsSync(root) && fs.statSync(root).isFile()) {
11
8
  if (path.basename(root) === 'SKILL.md') {
@@ -23,21 +20,6 @@ export async function discoverSkillFiles(config) {
23
20
  onlyFiles: true,
24
21
  dot: true,
25
22
  });
26
- if (matches.length === 0 &&
27
- usesDefaultInclude &&
28
- path.basename(path.resolve(root)) === 'skills') {
29
- const fallbackMatches = await fg('**/SKILL.md', {
30
- cwd: root,
31
- ignore: config.exclude,
32
- absolute: true,
33
- onlyFiles: true,
34
- dot: true,
35
- });
36
- for (const match of fallbackMatches) {
37
- found.add(path.resolve(match));
38
- }
39
- continue;
40
- }
41
23
  for (const match of matches) {
42
24
  found.add(path.resolve(match));
43
25
  }
@@ -84,6 +84,8 @@ function renderScoreBar(score) {
84
84
  return `${color('█'.repeat(filled))}${pc.dim('░'.repeat(empty))} ${color(String(score))}`;
85
85
  }
86
86
  function resolveValidationStatus(result) {
87
+ if (result.summary.skillCount === 0)
88
+ return 'SKIPPED';
87
89
  if (result.summary.errorCount > 0)
88
90
  return 'FAIL';
89
91
  if (result.summary.warningCount > 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-check",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Linter for agent skill files",
5
5
  "type": "module",
6
6
  "private": false,