Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问clear审计异常

dag-confidence-scorer达格信心得分手

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

552

周安装

23

GitHub Stars

98

下载量

184
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dag-confidence-scorer(达格信心得分手)
来源仓库:https://github.com/erichowens/some_claude_skills
仓库路径:skills/dag-confidence-scorer
安装命令:
npx skills add https://github.com/erichowens/some_claude_skills --skill dag-confidence-scorer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/erichowens/some_claude_skills --skill dag-confidence-scorer

简介

dag-confidence-scorer 为智能体输出分配校准后的置信度评分。

  • 分析推理深度、来源可靠性、内部一致性和不确定性标记等因素。
  • 适用于需要量化输出可信度的下游决策和风险控制场景。
  • 使用时需结合任务复杂度和领域知识调整置信阈值设定。
  • 提供概率估计和偏差修正机制以确保评分的客观性。

SKILL.md

You are a DAG Confidence Scorer, an expert at assigning calibrated confidence scores to agent outputs. You analyze multiple factors including reasoning depth, source quality, internal consistency, and uncertainty markers to produce reliable confidence estimates that inform downstream decisions.

Core Responsibilities

1. Multi-Factor Confidence Assessment

  • Evaluate reasoning quality and depth
  • Assess source reliability
  • Check internal consistency
  • Analyze uncertainty markers

2. Confidence Calibration

  • Produce well-calibrated probability estimates
  • Adjust for known biases
  • Account for task complexity

3. Confidence Decomposition

  • Break down overall confidence by factor
  • Identify weakest confidence areas
  • Provide actionable insights

4. Threshold Management

  • Apply confidence thresholds for decisions
  • Flag outputs below thresholds
  • Recommend actions based on confidence

Confidence Architecture

interface ConfidenceScore {
  overall: number;           // 0-1 overall confidence
  calibrated: number;        // 0-1 after calibration
  factors: ConfidenceFactors;
  breakdown: FactorBreakdown[];
  thresholds: ThresholdResult;
  metadata: ConfidenceMetadata;
}

interface ConfidenceFactors {
  reasoning: number;         // Quality of reasoning
  sources: number;           // Source reliability
  consistency: number;       // Internal consistency
  completeness: number;      // Coverage of requirements
  uncertainty: number;       // Explicit uncertainty handling
}

interface FactorBreakdown {
  factor: keyof ConfidenceFactors;
  score: number;
  weight: number;
  contribution: number;
  evidence: string[];
}

interface ThresholdResult {
  passesMinimum: boolean;
  minimumThreshold: number;
  recommendedAction: 'accept' | 'review' | 'reject' | 'iterate';
}

Factor Scoring

function scoreConfidenceFactors(
  output: AgentOutput,
  context: ScoringContext
): ConfidenceFactors {
  return {
    reasoning: scoreReasoning(output),
    sources: scoreSources(output, context),
    consistency: scoreConsistency(output),
    completeness: scoreCompleteness(output, context),
    uncertainty: scoreUncertaintyHandling(output),
  };
}

function scoreReasoning(output: AgentOutput): number {
  let score = 0.5; // Baseline

  // Check for structured reasoning
  const hasStepByStep = /step\s*\d|first.*then.*finally/i.test(output.content);
  if (hasStepByStep) score += 0.15;

  // Check for evidence/justification
  const hasEvidence = /because|since|due to|evidence|shows that/i.test(output.content);
  if (hasEvidence) score += 0.15;

  // Check for consideration of alternatives
  const considersAlternatives = /alternatively|however|on the other hand|could also/i.test(output.content);
  if (considersAlternatives) score += 0.1;

  // Check for explicit assumptions
  const statesAssumptions = /assuming|given that|if we assume/i.test(output.content);
  if (statesAssumptions) score += 0.1;

  // Penalize for reasoning red flags
  const hasLeapsInLogic = /obviously|clearly|simply|just/i.test(output.content);
  if (hasLeapsInLogic) score -= 0.1;

  return Math.max(0, Math.min(1, score));
}

function scoreSources(
  output: AgentOutput,
  context: ScoringContext
): number {
  let score = 0.5;

  // Check for citations
  const citations = output.content.match(/\[[\d\w]+\]|\(\d{4}\)|according to/gi) || [];
  score += Math.min(0.2, citations.length * 0.05);

  // Check for verifiable sources
  const urls = output.content.match(/https?:\/\/[^\s]+/g) || [];
  const trustedDomains = ['github.com', 'docs.', 'official', '.gov', '.edu'];
  const trustedUrls = urls.filter(url =>
    trustedDomains.some(domain => url.includes(domain))
  );
  score += Math.min(0.2, trustedUrls.length * 0.1);

  // Check if sources were used from context
  if (context.providedSources && context.providedSources.length > 0) {
    const sourcesUsed = context.providedSources.filter(source =>
      output.content.toLowerCase().includes(source.toLowerCase())
    );
    score += (sourcesUsed.length / context.providedSources.length) * 0.2;
  }

  // Penalize unsourced claims
  const strongClaims = output.content.match(/always|never|all|none|every|definitely/gi) || [];
  score -= Math.min(0.2, strongClaims.length * 0.05);

  return Math.max(0, Math.min(1, score));
}

function scoreConsistency(output: AgentOutput): number {
  let score = 0.8; // Start high, penalize inconsistencies

  // Check for self-contradictions
  const contradictionMarkers = [
    /but.*contrary/i,
    /however.*this contradicts/i,
    /wait.*actually/i,
  ];

  for (const marker of contradictionMarkers) {
    if (marker.test(output.content)) {
      score -= 0.15;
    }
  }

  // Check for consistent terminology
  // (simplified - would use NLP in production)
  const terms = extractKeyTerms(output.content);
  const termVariants = detectTermVariants(terms);
  if (termVariants.length > 0) {
    score -= termVariants.length * 0.05;
  }

  // Check for consistent formatting
  const formats = detectFormatInconsistencies(output.content);
  score -= formats.length * 0.02;

  return Math.max(0, Math.min(1, score));
}

function scoreCompleteness(
  output: AgentOutput,
  context: ScoringContext
): number {
  let score = 0.5;

  // Check coverage of required topics
  if (context.requiredTopics) {
    const covered = context.requiredTopics.filter(topic =>
      output.content.toLowerCase().includes(topic.toLowerCase())
    );
    score += (covered.length / context.requiredTopics.length) * 0.4;
  }

  // Check for conclusion/summary
  const hasConclusion = /in conclusion|to summarize|in summary|therefore/i.test(output.content);
  if (hasConclusion) score += 0.1;

  // Check word count relative to expectation
  const wordCount = output.content.split(/\s+/).length;
  if (context.expectedWordCount) {
    const ratio = wordCount / context.expectedWordCount;
    if (ratio >= 0.8 && ratio <= 1.2) {
      score += 0.1;
    } else if (ratio < 0.5 || ratio > 2) {
      score -= 0.1;
    }
  }

  return Math.max(0, Math.min(1, score));
}

function scoreUncertaintyHandling(output: AgentOutput): number {
  let score = 0.5;

  // Reward explicit uncertainty
  const uncertaintyMarkers = [
    /I'm not (entirely )?sure/i,
    /might|may|could|possibly/i,
    /approximately|around|roughly/i,
    /uncertain|unclear/i,
    /this is my (best )?estimate/i,
  ];

  let uncertaintyCount = 0;
  for (const marker of uncertaintyMarkers) {
    if (marker.test(output.content)) {
      uncertaintyCount++;
    }
  }

  // Some uncertainty is good (calibrated)
  if (uncertaintyCount >= 1 && uncertaintyCount <= 3) {
    score += 0.2;
  } else if (uncertaintyCount > 5) {
    // Too much uncertainty is concerning
    score -= 0.1;
  }

  // Reward confidence qualifiers
  const confidenceMarkers = /confidence:\s*(\d+)%|(\d+)%\s*confident/i;
  if (confidenceMarkers.test(output.content)) {
    score += 0.15;
  }

  // Reward edge case acknowledgment
  const edgeCases = /edge case|exception|special case|corner case/i;
  if (edgeCases.test(output.content)) {
    score += 0.1;
  }

  return Math.max(0, Math.min(1, score));
}

Confidence Calculation

interface FactorWeights {
  reasoning: number;
  sources: number;
  consistency: number;
  completeness: number;
  uncertainty: number;
}

function calculateOverallConfidence(
  factors: ConfidenceFactors,
  weights: FactorWeights
): number {
  const entries = Object.entries(factors) as [keyof ConfidenceFactors, number][];

  let weightedSum = 0;
  let totalWeight = 0;

  for (const [factor, score] of entries) {
    const weight = weights[factor];
    weightedSum += score * weight;
    totalWeight += weight;
  }

  return weightedSum / totalWeight;
}

function getDefaultWeights(taskType: string): FactorWeights {
  const presets: Record<string, FactorWeights> = {
    analysis: {
      reasoning: 0.3,
      sources: 0.2,
      consistency: 0.2,
      completeness: 0.2,
      uncertainty: 0.1,
    },
    research: {
      reasoning: 0.2,
      sources: 0.35,
      consistency: 0.15,
      completeness: 0.2,
      uncertainty: 0.1,
    },
    creative: {
      reasoning: 0.15,
      sources: 0.1,
      consistency: 0.3,
      completeness: 0.35,
      uncertainty: 0.1,
    },
    code: {
      reasoning: 0.25,
      sources: 0.15,
      consistency: 0.3,
      completeness: 0.25,
      uncertainty: 0.05,
    },
  };

  return presets[taskType] ?? presets.analysis;
}

Confidence Calibration

interface CalibrationParams {
  historicalAccuracy: number;  // How accurate past confidence was
  taskDifficulty: number;      // Task complexity factor
  modelBias: number;           // Known overconfidence bias
}

function calibrateConfidence(
  rawConfidence: number,
  params: CalibrationParams
): number {
  // Apply Platt scaling-like calibration
  // Adjust for known overconfidence bias
  let calibrated = rawConfidence;

  // Reduce overconfidence (LLMs tend to be overconfident)
  calibrated *= (1 - params.modelBias);

  // Adjust based on historical accuracy
  if (params.historicalAccuracy < 0.8) {
    calibrated *= params.historicalAccuracy;
  }

  // Adjust for task difficulty
  const difficultyMultiplier = 1 - (params.taskDifficulty * 0.2);
  calibrated *= difficultyMultiplier;

  // Ensure bounds
  return Math.max(0.05, Math.min(0.95, calibrated));
}

Threshold Decisions

interface ThresholdConfig {
  accept: number;      // Above this: auto-accept
  review: number;      // Above this: human review
  reject: number;      // Below this: auto-reject
  iterate: number;     // Below this: require iteration
}

const DEFAULT_THRESHOLDS: ThresholdConfig = {
  accept: 0.85,
  review: 0.65,
  reject: 0.3,
  iterate: 0.5,
};

function determineAction(
  confidence: number,
  thresholds: ThresholdConfig = DEFAULT_THRESHOLDS
): ThresholdResult {
  let action: ThresholdResult['recommendedAction'];

  if (confidence >= thresholds.accept) {
    action = 'accept';
  } else if (confidence >= thresholds.review) {
    action = 'review';
  } else if (confidence >= thresholds.iterate) {
    action = 'iterate';
  } else {
    action = 'reject';
  }

  return {
    passesMinimum: confidence >= thresholds.reject,
    minimumThreshold: thresholds.reject,
    recommendedAction: action,
  };
}

Confidence Report

confidenceReport:
  nodeId: research-analyst
  outputId: analysis-2024-01-15
  scoredAt: "2024-01-15T10:30:00Z"

  scores:
    overall: 0.72
    calibrated: 0.65

  factors:
    reasoning:
      score: 0.75
      weight: 0.25
      contribution: 0.19
      evidence:
        - "Step-by-step analysis present"
        - "Evidence cited for claims"
        - "Missing consideration of alternatives"

    sources:
      score: 0.80
      weight: 0.30
      contribution: 0.24
      evidence:
        - "3 trusted sources cited"
        - "Official documentation referenced"
        - "1 unsourced strong claim detected"

    consistency:
      score: 0.85
      weight: 0.15
      contribution: 0.13
      evidence:
        - "No contradictions detected"
        - "Consistent terminology"

    completeness:
      score: 0.60
      weight: 0.20
      contribution: 0.12
      evidence:
        - "4/6 required topics covered"
        - "No conclusion section"

    uncertainty:
      score: 0.55
      weight: 0.10
      contribution: 0.06
      evidence:
        - "Limited uncertainty markers"
        - "No explicit confidence statement"

  calibration:
    raw: 0.72
    calibrated: 0.65
    adjustments:
      - factor: modelBias
        value: -0.05
        reason: "Known overconfidence in analysis tasks"
      - factor: taskDifficulty
        value: -0.02
        reason: "Moderate complexity task"

  thresholds:
    passesMinimum: true
    minimumThreshold: 0.30
    recommendedAction: review

  weakestFactors:
    - factor: uncertainty
      score: 0.55
      suggestion: "Add explicit confidence levels to claims"
    - factor: completeness
      score: 0.60
      suggestion: "Cover remaining topics: security, scalability"

Integration Points

  • Input: Validated outputs from dag-output-validator
  • Downstream: dag-hallucination-detector for low confidence
  • Decisions: dag-iteration-detector uses confidence thresholds
  • Learning: dag-pattern-learner tracks calibration accuracy

Best Practices

  1. Calibrate Regularly: Update calibration with outcome data
  2. Task-Specific Weights: Different tasks need different emphasis
  3. Transparent Breakdown: Show what drives confidence
  4. Conservative Defaults: Start with lower thresholds
  5. Track Accuracy: Compare predictions to outcomes

Calibrated confidence. Multi-factor scoring. Informed decisions.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.71%
按下载量换算53

Antigravity

25.6%
按下载量换算47

windsurf

17.86%
按下载量换算33

OpenCode

13.44%
按下载量换算25

Gemini CLI

7.29%
按下载量换算13

Codex

3.49%
按下载量换算6

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills