markstream-angular
它能做什么
这个工具可以帮你在 Angular(一种网页开发技术)项目中添加 Markstream 组件。它能让内容像聊天一样逐步显示出来,并确保显示的内容是安全的。
适用场景
- ✓当你希望文字在 Angular 网站上逐个字符或逐个词语地出现时。
- ✓需要在现代 Angular 应用中安全地显示内容时。
- ✓如果你需要集成一个可以实时更新的文本显示系统。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/markstream-angular/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我怎样才能让文字在我的 Angular 网站上逐步出现?”
每周 5 个新技能,1 分钟读完。
工作原理
这个工具会把一个特殊组件插入你的 Angular 代码中。该组件被配置为接收文本,并以可控的方式显示,同时提供动画和安全方面的选项。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Markstream Angular
Overview
Add Markstream to Angular 20+ while preserving standalone-component patterns, signal-friendly bindings, safe rendering defaults, and explicit optional dependencies. Use markstream-install for framework selection; use this skill once Angular is confirmed.
When to Use
Use for Angular-specific standalone imports, CSS, signals, custom tags or components, streaming state, and optional peers. Do not use below Angular 20 or when the application cannot accept an alpha renderer API.
Workflow
Inspect the existing package manager, installed package version and project conventions. A requested scoped integration already authorizes routine source/dependency edits; seek approval only for a material scope expansion or unresolved beta/alpha adoption decision.
- Confirm Angular 20+ and record that
markstream-angularis alpha. - Install the package plus only requested peers. Import
markstream-angular/index.css; add KaTeX CSS only for math. - Import
MarkstreamAngularComponentinto the standalone component'simports. - Start with
[content]and[smoothStreaming]="'auto'". Usenodesplusfinalonly when another layer owns the AST. - For live chat use
[fade]="false"and opt into[typewriter]="true". On completion set[final]="true", disable pacing/cursor, and enable fade only if desired. - Use
[customHtmlTags]and[customComponents]only for trusted tag workflows. - Keep
[htmlPolicy]="'safe'"and Mermaid strict mode unless a narrowly scoped trusted legacy surface requires otherwise. - Validate with the smallest Angular build, typecheck, or dev command.
Example
import { Component, signal } from '@angular/core'
import { MarkstreamAngularComponent } from 'markstream-angular'
import 'markstream-angular/index.css'
@Component({
selector: 'app-answer',
standalone: true,
imports: [MarkstreamAngularComponent],
template: `
<markstream-angular
[content]="markdown()"
[final]="done()"
[fade]="done()"
[typewriter]="!done()"
[smoothStreaming]="done() ? false : 'auto'"
[htmlPolicy]="'safe'"
/>
`,
})
export class AnswerComponent {
markdown = signal('# Streaming answer')
done = signal(false)
}
Limitations
- Requires Angular 20+ and an alpha package.
- Browser-heavy peers may need bundler or client-boundary work.
- This skill does not design the host chat architecture or visual system.
Security & Safety Notes
Review dependency changes before installation. Never broaden HTML or Mermaid trust settings for untrusted model output.
Verify props, export paths and peer ranges against the installed package, not a mutable upstream main. Test partial and completed streams, malformed/untrusted Markdown, links and image URLs, cancellation and reduced motion. Safe HTML and strict diagrams reduce exposure but do not alone enforce URL/network privacy or application component permissions.
常见问题
“alpha”是什么意思?
alpha 表示该工具仍处于测试阶段,可能会有变动。建议只在你清楚自己在做什么并了解相关风险的情况下使用。
什么是 standalone component(独立组件)?
这是 Angular 中一种更现代的代码组织方式,每个部分都更加独立。这个工具就是为了很好地配合这种模式而设计的。
“safe HTML defaults”是什么意思?
意思是该工具默认会阻止危险代码显示在你的网站上,从而保护用户。
详情
作者的原始描述
Integrate the alpha markstream-angular renderer into Angular 20+ applications with standalone components, signals, safe HTML defaults, and optional peer features.
热度
- GitHub 星标
- 48k
- 排名
- #5167
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。