Skip to content
cccskills
Official · GitHub CopilotFreePublished on GitHub

issue-markdown

Build or refactor Markdown for GitHub issues, comments, and reviews as typed report trees, then render each complete document once. This helps preserve attribution, metadata, mentions, and size limits when publishing generated or imported content.

OriginalShow the original description

Build and refactor issue, comment, and review bodies in actions/setup/js using typed report trees and a single publication render.

github/gh-aw5,521 stars(GitHub 5,521 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Refactoring issue and comment bodies into typed report trees
  • Publishing generated workflow results with attribution and metadata
  • Importing existing Markdown while preserving mention and heading policies
  • Keeping comments within exact publication size limits

Files included (1)

  • SKILL.md6.9 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Issue and comment Markdown

Use this skill when generating or changing Markdown published to issues, comments, or reviews, especially in actions/setup/js/. Build a Report tree first; render only the complete document. Do not assemble Markdown using interpolation, concatenation, body +=, or arrays of Markdown strings joined with newlines. Parsing an assembled string afterward is not a tree-first refactor.

Find publication paths

Search production .cjs files for issues.create, issues.update, createComment, updateComment, createReview, createReplyForReviewComment, and GraphQL body variables. Trace each body back through shared helpers, fallback comments, retries, staged previews, and append/prepend/replace-island updates. Exclude test fixtures, HTTP payload assembly, and step-summary-only output. Jira ADF text is not Markdown: preserve its literal entities, Unicode, and paragraphs instead of routing it through the Markdown parser or renderer.

Use the existing tree

actions/setup/js/report_ast.cjs defines Report, ReportBlock, and ReportInline. Use JSDoc annotations so npm run typecheck verifies node kinds:

/** @type {import("./report_ast.cjs").Report} */
const report = {
  type: "report",
  title: "Workflow result",
  children: [
    {
      type: "paragraph",
      agentTainted: false,
      children: [
        { type: "text", value: "Created related issue: ", agentTainted: false },
        { type: "issue_reference", number: String(issue.number), agentTainted: false },
      ],
    },
    { type: "code_block", language: "text", value: diagnostic, agentTainted: true },
  ],
};

Use heading, paragraph, list, table, details, quote, alert, separator, code_block, and typed inline nodes instead of Markdown punctuation. GitHub [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], and [!CAUTION] map to alert nodes with the matching kind; the renderer emits their markers. Keep alerts separate rather than nesting them inside another alert, which GitHub does not support. Preserve supported <sub> formatting in details summaries. Use xml_marker, json_marker, expiration, and closing_reference for machine metadata and closing links. Preserve xml_marker.compact for identifiers whose exact spelling is used by cleanup. Use review_marker for the durable, URI-encoded review caller reference; keep the authoritative marker last. Dynamic labels, paths, errors, and identifiers belong in text/code nodes; link destinations belong in link.url.

Import existing agent/user Markdown with parseReportMarkdown, specifying agentTainted: true, the correct allowedMentions, and the existing heading and metadata policy. Parse configured templates before scalar substitution using context; use typed inline/block slots for inserted nodes. Never interpolate untrusted values into a template before parsing it. A literal code fence in imported content must not swallow attribution or adjacent generated blocks.

For managed comment memory, set code_block.language to gh-aw-comment-memory:<id> and fenceLength: 6; rendering lengthens the fence past embedded backticks. Do not construct or slice fences by hand.

Compose shared attribution

Use the typed variants instead of rendering a helper and reparsing its output:

PurposeTree-first API
Generated attribution and guard noticesbuildGeneratedFooterBlocks / assembleReportBodyParts in markdown_body_helpers.cjs
Deferred footer templates and diagnostic sectionsbuildFooterBlocks(getFooterMessageParts(context)) in messages_footer.cjs
Configured policy footergetBodyFooterBlocks or appendConfiguredReportFooter
Detection warninggetDetectionCautionBlocks
Failure-comment attributiongetFooterAgentFailureCommentBlocks
Authoritative execution metadataappendReportExecutionProvenance

Keep custom templates and their scalar context separate until composition. Headers and footers may jointly open/close <details>; use buildIssueBodyReport to parse these wrappers together around body slots. Allocate unique slot names against both source text and previously allocated slots, and reject wrappers that swallow slots inside code fences. Internal framework notes carried between handlers use non-JSON-forgeable Symbols such as COMMENT_PREAMBLE and ISSUE_BODY_SUFFIX, never agent-settable flags.

Preserve publication contracts

Framework-authored nodes use agentTainted: false; agent-owned descendants retain their taint even inside framework wrappers. Keep required footer diagnostics, metadata, and policy text protected during size fitting. Do not mark an entire agent body trusted to keep it from being shortened.

For attributed safe-output issues and comments, use buildIssueBodyReport in issue_body.cjs; it accepts Markdown or typed body blocks and retains configured wrappers, attribution, expiration, and execution provenance. Comment callers set the appropriate itemType and workflowIdMarker: false. Pass the original workflow runUrl when the target repository differs from the execution repository. Fallback issues must import the original agent body and compose recovery nodes, not reparse an already assembled or rendered PR/discussion description.

For other issue producers, pass a typed report to renderIssueParameters/createReportIssue in issue_report.cjs, preserving the existing authentication and retry boundary. buildIssueReport accepts typed blocks as well as imported Markdown. For comments, render the complete tree with renderSizedReport from report_size.cjs and pass its body to the existing API. Do not render fragments and concatenate or reparse them. Keep one logical render boundary, including metadata and trusted footers in its size budget. renderSizedReport trims trailing whitespace automatically and measures the publication body against the exact maxLength. Do not trim its result or reserve an extra character for a terminal newline. Low-level renderReport retains its terminal newline for Markdown serialization. Never truncate rendered Markdown or trusted policy text to fit.

Validate the migration

Preserve footer on/off behavior, marker identity and order, mention/link limits, expiration, cross-repository attribution, structured state recovery, managed memory extraction, review fallbacks, and append/prepend/island semantics. Assert tree shape as well as rendered output. Cover hostile backticks and HTML delimiters, Unicode, escaped table cells, and the exact publication size limit. Update formatting expectations only for intentional canonical rendering, not to hide lost content or metadata.

Run the matching Vitest suites from actions/setup/js, npm run typecheck, and the repository JavaScript formatting/lint gates. Follow the developer skill for final repository validation and publication.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

agent-collaboration

Official · GitHub CopilotFreeSummary

Coordinate work across AI agents with shared rules for locating team files, recording decisions and their reasons, and requesting help. It also defines who owns revisions after a reviewer rejects an artifact.

  • Locate team files across separate working directories
  • Record decisions that affect other agents
  • Request input from another specialist
github/gh-aw5.5KUpdated Oct 30, 2026

agent-conduct

Official · GitHub CopilotFreeSummary

Set shared development rules for an agent team: keep specific agent names out of product code, tests, and CI configuration, verify affected tests before finishing, and record lessons learned from mistakes.

  • Share development rules across multiple agents
  • Keep team-specific agent names out of code and tests
  • Check affected tests before declaring work complete
github/gh-aw5.5KUpdated Oct 30, 2026

agentic-workflows

Official · GitHub CopilotFreeSummary

Routes requests to design, create, update, debug, or upgrade GitHub Agentic Workflows to the appropriate instructions. It helps the agent select a workflow-specific procedure and apply any additional rules defined for the repository.

  • Designing a new workflow through questions
  • Investigating failed runs and recurring errors
  • Upgrading workflows and addressing deprecations
github/gh-aw5.5KUpdated Oct 30, 2026

architectural-proposals

Official · GitHub CopilotFreeSummary

Prepare architecture proposals before implementation so the team can agree on a direction. Organize evidence, technical choices, effects on existing work, risks, and the first release’s scope into a document with clear recommendations and decision owners.

  • Proposing a major architecture change
  • Replanning milestones after a foundation change
  • Comparing technical options before seeking approval
github/gh-aw5.5KUpdated Oct 30, 2026

awf-release-integrator

Official · GitHub CopilotFreeSummary

Update the gh-aw-firewall version used by gh-aw, rebuild generated files, and review release notes and configuration schemas, which define valid settings. It guides related code and test updates while identifying follow-up work that remains.

  • Updating the firewall version used by gh-aw
  • Reviewing release notes for integration changes
  • Checking configuration schema differences
github/gh-aw5.5KUpdated Oct 30, 2026

checkout-credential-review

Official · GitHub CopilotFreeSummary

Review git and gh operations in gh-aw workflows to check credential availability for each repository. Identify missing token handoffs, risky expansions of limited checkouts, and error handling needed where credentials are intentionally unavailable.

  • Reviewing git operations after repository checkout
  • Checking tokens for private cross-repository access
  • Reviewing sparse and shallow checkout changes
github/gh-aw5.5KUpdated Oct 30, 2026

See all skills by github

Report a problem with this skill